C 练习实例64
题目:利用ellipse and rectangle 画图(在TC中实现)。
程序分析:无。文章源自公式库网-https://www.gongshiku.com/html/202112/c-lianxishili64.html
实例
#include "stdio.h"
#include "graphics.h"
#include "conio.h"
main()
{
int driver=VGA,mode=VGAHI;
int i,num=15,top=50;
int left=20,right=50;
initgraph(&driver,&mode,"");
for(i=0;i<num;i++)
{
ellipse(250,250,0,360,right,left);
ellipse(250,250,0,360,20,top);
rectangle(20-2*i,20-2*i,10*(i+2),10*(i+2));
right+=5;
left+=5;
top+=10;
}
getch();
}
文章源自公式库网-https://www.gongshiku.com/html/202112/c-lianxishili64.html文章源自公式库网-https://www.gongshiku.com/html/202112/c-lianxishili64.html
运营不易,
感谢支持!
我的微信
微信号已复制
我的微信公众号
我的微信公众号扫一扫
我的公众号
公众号已复制