題目:學用rectangle畫方形,(在TC中實作),
程式分析:無,
程式源代碼:
1 #include "graphics.h" 2 int main() 3 { 4 int x0,y0,y1,x1,driver,mode,i; 5 driver=VGA;mode=VGAHI; 6 initgraph(&driver,&mode,""); 7 setbkcolor(YELLOW); 8 x0=263;y0=263;y1=275;x1=275; 9 for(i=0;i<=18;i++) 10 { 11 setcolor(1); 12 rectangle(x0,y0,x1,y1); 13 x0=x0-5; 14 y0=y0-5; 15 x1=x1+5; 16 y1=y1+5; 17 } 18 settextstyle(DEFAULT_FONT,HORIZ_DIR,2); 19 outtextxy(150,40,"How beautiful it is!"); 20 line(130,60,480,60); 21 setcolor(2); 22 circle(269,269,137); 23 }
感謝你的閱讀,請用心感悟!希望可以幫到愛學習的你!!分享也是一種快樂!!!請接力,,,
點擊查看原文,謝謝!
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/6541.html
標籤:C
下一篇:C 實戰練習題目59
