C语言程序设计项目式教程画出数字2教学课件.pptx
《C语言程序设计项目式教程画出数字2教学课件.pptx》由会员分享,可在线阅读,更多相关《C语言程序设计项目式教程画出数字2教学课件.pptx(5页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、浙江安防职业技术学院C程序设计项目四 用C图形函数画创意图案数字数字数字数字“2”“2”“2”“2”主讲教师 金国伟浙江安防职业技术学院C程序设计ji(7*20,4*20)浙江安防职业技术学院C程序设计 int a1818=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,
2、0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3、0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;浙江安防职业技术学院C程序设计 initgraph(640,480);setbkcolor(WHITE);cleardevice();setfillcolor(BLACK);for(i=0;i18;i+)/i代表行标 for(j=0;j18;j+)/j代表列标 if(aij=1)fillrectangle(j*20,i*20,j*20+20,i*20+20);getch();/使程序暂停,按任意键继续 closegraph();判断数组元素的值是否为1,条件为真填充小方格 由于小方格边长为20,根据行标和列标与角点坐标的关系,填充小方格浙江安防职业技术学院C程序设计用二维数组画图小结:谢谢!
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 语言程序设计 项目 教程 画出 数字 教学 课件
限制150内