# include < graphics.h >
# include
# include void main ( ) { int gd = 0, gm, I, j, s;
int *a;
initgraph(&gd,&gm,"");
setcolor ( 4 ); circle ( 30, 30, 20 );
putpixel ( 30, 30, 2);
rectangle ( 10, 10, 50, 50);
s = imagesize ( 9, 9, 51, 51);
*a = new int;
*a = s;
getimage (9, 9, 51, 51, a);
for ( i = 0; i < = 585; i + +) { putimage ( i, 10, a, 0);
sound (20);
delay (10);
nosound ( );
}
for ( j = 10;
j < = 420;
j + +) { putimage(585, j, a, 0 );
sound ( 30 );
delay (10);
nosound( );
} for (i = 585;
i > = 10; i - -) { putimage(i, 420, a, 0);
delay ( 10 );
}
for (j = 420; j >10; j - -) { putimage(10, j, a, 0);
delay( 10 );
} delete a;
getch();
//closegraph( );
}
Nazorat savollari:
C++ da grafik rejimida ishlash uchun qanday fayli mavjud?
Kompyuterda graphics.h fayli bilan ishlash imkoniyatini yaratadigan maxsus qurilma nima deb nomlanadi?
circle (x, y, r) – operatorining vazifasini nima?
Eng ko’p ishlatiladigan adapterlarga misollar keltiring?
Dinamik xotira nima va u qanday tashkil qilinadi?
Do'stlaringiz bilan baham: |