witam mam problem z pozbyciem sie czarnego tła na ktorym pojawia sie wprowadzany przeze mnie tekst oraz w jaki sposob zapisac wyniki do obliczen pod rysunkiem
oto kod jaki napisałem:
#include <iostream.h>
#include <winbgim.h>
#include <math.h>
using namespace std;
int main( int argc, char * argv[] )
{
int a, F;
float x, y;
cout << "Podaj wartosc sily jaka dziala na belke, aby program wyzaczyl \nreakcje podporowe w ukladzie przedstawionym na rysunku." << endl;
cout << "Podaj wartosci sily F = "; cin >> F;
//y=(1/2)*F;
//x=F+y;
initwindow( 640, 480 );
setfillstyle( SOLID_FILL, WHITE );
bar( 0, 0, getmaxx(), getmaxy() );
setcolor( 0 );
settextstyle( 10, 0, 3 );
outtextxy( 60, 160, "A" );
outtextxy( 410, 180, "B" );
setlinestyle( 0, 2, 5 );
line( 100, 200, 400, 200 );
line( 90, 220, 100, 200 );
line( 100, 200, 110, 220 );
line( 80, 220, 120, 220 );
line( 390, 220, 400, 200 );
line( 400, 200, 410, 220 );
line( 380, 220, 420, 220 );
line( 380, 230, 420, 230 );
setlinestyle( 0, 2, 1 );
line( 70, 230, 80, 220 );
line( 80, 230, 90, 220 );
line( 90, 230, 100, 220 );
line( 100, 230, 110, 220 );
line( 110, 230, 120, 220 );
line( 120, 230, 130, 220 );
line( 370, 240, 380, 230 );
line( 380, 240, 390, 230 );
line( 390, 240, 400, 230 );
line( 400, 240, 410, 230 );
line( 410, 240, 420, 230 );
line( 420, 240, 430, 230 );
setlinestyle( 0, 2, 2 );
settextstyle( 10, 0, 2 );
outtextxy( 145, 230, "0,5a" );
outtextxy( 305, 230, "0,5a" );
line( 100, 200, 100, 250 );
line( 250, 200, 250, 250 );
line( 400, 200, 400, 250 );
line( 100, 250, 400, 250 );
line( 100, 250, 110, 240 );
line( 100, 250, 110, 260 );
line( 240, 240, 250, 250 );
line( 240, 260, 250, 250 );
line( 250, 250, 260, 240 );
line( 250, 250, 260, 260 );
line( 390, 240, 400, 250 );
line( 390, 260, 400, 250 );
setcolor( 1 );
settextstyle( 10, 0, 5 );
outtextxy( 270, 120, "F" );
setlinestyle( 0, 1, 3 );
line( 250, 100, 250, 200 );
line( 240, 190, 250, 200 );
line( 250, 200, 260, 190 );
setcolor( 4 );
settextstyle( 10, 0, 3 );
outtextxy( 20, 210, "Rax" );
outtextxy( 110, 110, "Ray" );
outtextxy( 420, 120, "Rb" );
line( 100, 100, 100, 200 );
line( 400, 100, 400, 200 );
line( 90, 110, 100, 100 );
line( 100, 100, 110, 110 );
line( 390, 110, 400, 100 );
line( 400, 100, 410, 110 );
line( 20, 200, 100, 200 );
line( 90, 190, 100, 200 );
line( 90, 210, 100, 200 );
setcolor( 2 );
settextstyle( 10, 0, 2 );
outtext( "Schematyczny rysunek belki" );
outtextxy( 100, 300, "ODP:" );
outtextxy( 100, 320, "Rax = 0" );
outtextxy( 100, 340, "Ray = " /*<<x<<*/ );
outtextxy( 100, 363, "Rb = " /*<<y<<*/ );
system( "PAUSE" );
closegraph();
return EXIT_SUCCESS;
}
Prosze o pomoc.