C 練習(xí)實(shí)例63
題目:畫橢圓ellipse(在TC中實(shí)現(xiàn))。
程序分析:無。
程序源代碼:
// Created by hgci.cn on 15/11/9. // Copyright © 2015年 W3Cschool教程. All rights reserved. // #include "stdio.h" #include "graphics.h" #include "conio.h" int main() { int x=360,y=160,driver=VGA,mode=VGAHI; int num=20,i; int top,bottom; initgraph(&driver,&mode,""); top=y-30; bottom=y-30; for(i=0;i<num;i++) { ellipse(250,250,0,360,top,bottom); top-=5; bottom+=5; } getch(); }
更多建議: