題目:利用ellipse and rectangle 畫圖(在TC中實作),
程式分析:無,
程式源代碼:
1 #include "stdio.h" 2 #include "graphics.h" 3 #include "conio.h" 4 main() 5 { 6 int driver=VGA,mode=VGAHI; 7 int i,num=15,top=50; 8 int left=20,right=50; 9 initgraph(&driver,&mode,""); 10 for(i=0;i<num;i++) 11 { 12 ellipse(250,250,0,360,right,left); 13 ellipse(250,250,0,360,20,top); 14 rectangle(20-2*i,20-2*i,10*(i+2),10*(i+2)); 15 right+=5; 16 left+=5; 17 top+=10; 18 } 19 getch(); 20 }
感謝你的閱讀,請用心感悟!希望可以幫到愛學習的你!!分享也是一種快樂!!!請接力,,,
點擊查看原文,謝謝!
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/6551.html
標籤:C
上一篇:C的雜亂筆記
下一篇:C 實戰練習題目65
