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