当前位置: 首页 > news >正文

大型网站开发框架有哪些效果好企业营销型网站建设公司

大型网站开发框架有哪些,效果好企业营销型网站建设公司,物业管理 网站开发,自建网站的劣势计算机程序设计(C语言)课程设计报告.doc计算机程序设计C语言课程设计报告题目电子动画时钟 学院 机电工程学院专业 班级090109班学号 姓名 指导教师 设计日期 一、概述选题背景 随着社会的进步和科技的发展#xff0c;电子钟表逐渐成为了人们生活中不可缺少的一部分。设计思路…计算机程序设计(C语言)课程设计报告.doc计算机程序设计C语言课程设计报告题目电子动画时钟 学院 机电工程学院专业 班级090109班学号 姓名 指导教师 设计日期 一、概述选题背景 随着社会的进步和科技的发展电子钟表逐渐成为了人们生活中不可缺少的一部分。设计思路(一)功能模块设计1.电子时钟执行主流程2.电子时钟界面显示3.电子时钟按键控制模块4.时钟动画处理模块(二)数据结构设计1.time结构体2.全局变量(三)函数功能描述1.keyhandle2.timeupchange3.timedownchange4.digitclock5.drawcursor6.clearcursor7.void clockhandle8.main(四)程序实现(五)运行结果。 二、概要设计2.1、数据结构 此程序中使用了C语言的time结构体和几个全局变量1.time结构体struct timeunsigned char ti_min; /*分钟*/unsigned char ti_hour; /*小时*/unsigned char ti_hund; /*百分之一秒*/unsigned char ti_sec; /*秒*/;time结构体定义在dos.h文件中可用来保存系统的当前时间其中各字段的值的含义如下。1.unsigned char ti_min保存分钟值。2.unsigned char ti_hour保存小时。3.unsigned char ti_hund保存百分之一秒例如ti_hund500表示1/500秒。4.unsigned char ti_sec保存秒数。2.2、全局变量 下面对程序用到的全局变量及数组进行说明.1. double h,m,s 此3个全局变量分别用来保存小时分钟秒数。 2. double x,x1,x2,y,y1,y2保存数字时钟中小时分秒在屏幕中显示的坐标值。3.struct time t1定义一个time结构类型的数组此数组只有t0一个元素。 2.3 模块列表 1.时钟动画处理模块时钟动画处理模块主要由clockhandle函数来实现程序中旧时钟指针的擦除是借助setwritemodemode函数设置画线的方式来实现。如果mode1则表示画线时用现在特性的线所画之处原有的线性异或(XOR操作实际上画出的线是原有线与现在规定的线进行异或后的结果。因此当线的特性不变时进行两次画线操作相当于没有画线即在当前位置处清除了原来的画线。2.时钟按键控制模块在电子时钟中按键控制模块最主要的工作就是必须能读取用户按键对按键值进行判断并调用相应函数来执行相关操作。3.数字时钟处理模块(1)调用digitclockint x,int y,int clock函数。在数字时钟r指定位置显示时分秒其中digithourdouble h,int digitourdouble h和digitsecdoubles用于完成数值的double型向int型转换。(2)调用drawcursorint count,clearcursorint count函数来完成旧光标的擦除和新光标的绘制。2.4、程序结构图(也就是模块之间的关系) 数字时钟模块按键控模块界面显示模块时钟动画处理模块电子时钟 三 、详细设计3.1程序预处理模块。包括加载头文件定义常量变量结构体数组和函数原型声明。 3.2主控模块main.main函数主要实现了对电子时钟的初始化工作及clockhandle函数的调用。3.3时钟动画处理模块。3.4时针按键控制模块。在电子时钟中按键控制模块最主要的工作就是必须能读取用户按键对按键值进行判断并调用相应函数来执行相关操作。流程图如下。3.5数字时针处理模块。在数字时钟处理模块中主要实现数字时钟的显示和数字的时钟修改。其中在数字时钟的修改中用户可以按Tab键定位需要修改的内容的位置然后通过按光标上移或下移键来修改时间。四、调试程序错误1 错误现象Declaration syntan error错误原因声明错误缺分号。修改方法在声明语句后添加分号。错误2 错误现象Two few parameters in call to setlinestyle in function main 错误原因语句缺少参数。 修改方法在main函数中找到缺少参数的语句添加相应的参数。错误3错误原因Function call missing)in function clockhandle错误原因在clockhandle函数调用的是后函数表达式缺少一个)。修改方法找到错误语句添加缺少的表达式符号。五、心得总结程序优点本程序旨在训练学生的基本编程能力本程序中涉及时间结构体数组绘图等方面的知识通过本程序的训练使学生能对C语言有一个更深刻的了解。掌握利用C语言相关函数开发电子时钟的基本原理为进一步开发出高质量的程序打下坚实的基础。程序缺点程序各个模块之间的控制连接比较繁琐容易出现错误。六附程序清单includegraphics.hincludestdio.hincludemath.hincludedos.hdefine PI 3.1415926define UP 0 x4800define DOWN 0 x5000define Esc 0 x11bdefine TAB 0 xf09int keyhandle int,int;int timeupchange int;int timedownchange int;int digithour double;int digitmin double;int digitsec double;void digitclock int,int,int;void drawcursor int ;void clearcursor int ;void clockhandle ;double h,m,s ;double x,x1,x2,y,y1,y2;struct time t1 ; mainint driver,mode0,i,j;driver DETECT;initgraph setlinestyle 0,0,3;setbkcolor0;line82,430,558,430;line70,62,70,418;line82,50,558,50;line570,62,570,418;line70,62,570,62;line76,56,297,56;line340,56,564,56;/*arcint x, int y, int. stangle, int endangle, int radius*/arc82,62,90,180,12;arc558,62,0,90,12;setlinestyle 0,0,3;arc82,418,180,279,12;setlinestyle 0,0,3;arc558,418,270,360,12;setcolor15;outtextxy300,53,CLOCK;setcolor7;rectangle342,72,560,360;setwritemode0;setcolor15;outtextxy433,75,CLOCK;setcolor7;line392,310,510,310;line392,330,510,330;arc392,320,90,270,10;arc510,320,270,90,10;setcolor5;fori431;i470;i39 forj317;j324;j7 setlinestyle0,0,3; circlei,j,1;setcolor15 ;line424,315,424,325;fori0,m0,h0;i11;i,h x100*sin h*60m/360*PI451 ; y200-100*cos h*60m/360*PI ; setlinestyle0,0,3 ; circlex,y,1 ; fori0,m0 ;i59;m,i x100*sin m/30*PI451; y200-100*cosm/30*PI ; setlinestyle0,0,1 ; circlex,y,1 ;setcolor4 ;outtextxy182,125, HELP ;setcolor5 ;outtextxy140,185, TAB Cursor move ;outtextxy140,225, UP Time ;outtextxy140,265, DOWN Time ;outtextxy140,305, Esc Quit system ;outtextxy140,345, Version 2.0 ;setcolor12;outtextxy150,400, Nothing is more important than time ;clockhandle ;closegraph ;return0;void clockhandle int k0,count ;setcolor15 ;gettimet ;ht0.ti_hour ;mt0.ti_min ;x50*sinh*60m/360*PI451 ;y200-50*cosh*60m /360*PI ;line451,200,x,y;x180*sinm/30*PI 451 ;y1200-80*cosm/30*PI ;line451,200,x1,y1 ; digitclock408,318,digithourh; digitclock446,318,digitminm;setwritemode1 ;forcount2;kEsc; setcolor12 ; sound500; delay700; sound200; delay300;nosound ;st0.ti_sec ;mt0.ti_min ;ht0.ti_hour ;x298*sins/30*PI451 ;y2200-98*coss/30*PI ;line451,200,x2,y2 ;whilet0.ti_secst0.ti_minmt0.ti_hourh gettimet; ifbioskey10 kbioskey0; countkeyhandlek,count ; ifcount5 count1 ; setcolor15 ;digitclock 485,318,digitsecs1 ;setcolor12 ;x298*sins/30*PI451 ;y2200-98*coss/30*PI ;line451,200,x2,y2 ;ift0.ti_minm setcolor15 ; x180*sinm/30*PI451 ; y1200-80*cosm/30*PI ; line451,200,x1,y1 ;mt0.ti_min ;digitclock446,318,digitminm ;x180*sinm/30*PI451 ;y1200-80*cosm/30*PI ;line451,200,x1,y1 ;ift0.ti_hour*60t0.ti_minh*60m setcolor15 ;x50*sinh*60m/360*PI451 ; y200-50*cosh*60m/360*PI;line450,200,x,y ; ht0.ti_hour ; digitclock408,318,digithour h ;x50*sinh*60m/360*PI ;line451,200,x,y ;int keyhandleint key ,int count switchkey case UP timeupchangecount-1; break ;case DOWN timedownchange count-1 ;break ;case TAB setcolor 15 ;clearcursorcount ;drawcursorcount ;count ;break;return count ;int timeupchangeint count ifcount1 t0.ti_hour; ift0.ti_hour24 t0.ti_hour0; settimet ; if count2 t0.ti_min; ift0.ti_min60 t0.ti_min0 ; settimet ;ifcount3 t0.ti_sec;ift0.ti_sec60 t0.ti_sec0 ;settimet ;int timedownchangeint count ifcount1 t0.ti_hour ; ift0.ti_hour0 t0.ti_hour23 ; settimet ; ifcount2 t0.ti_min; ift0.ti_min0 t0.ti_min59 ; settimet ;ifcount3 t0.ti_sec ; ift0.ti_sec0 t0.ti_sec59; settime t ; void digitclockint x, int y, int clockchar buffer110; setfillstyle0,2 ; bar x,y,x15,328 ; if clock60 clock0 ; sprintfbuffer1,d,clock ; outtextxyx,y,buffer1 ;int digithourdouble h int i; fori0;i23;i ifhi return i ; int digitmindouble m int i ; fori0;i59 ;i ifmi return i;int digitsecdouble s int i; fori0; i59;i ifsi return i ;void drawcursor int countswitchcount case 1line 424,315,424,325;break ; case 2line465,315,465,325 ; break; case 3line505,315,505,325 ; break ; void clearcursor int count switchcount case 2 line 424,315,424,325 ; break ; case 3line 465,315,465,325 ; break ; case 1 line 505,315,505,325 ; break ; 结束
http://wiki.neutronadmin.com/news/413350/

相关文章:

  • 网站建设 会计科目wordpress chm文档
  • 仿制网站建设外链百科
  • 如何建设一个简单的公司网站wordpress怎样设置友情链接
  • 教做蛋糕的网站学习软件编程
  • 比较好的高端网站制作公司定陶菏泽网站建设
  • 外贸网站建设内容包括wordpress附件扩展格式
  • 想做网站找什么公司做信息网站怎么样
  • 做空间的网站logo设计软件app
  • 戴尔网站建设成功的关键怎么做收费网站
  • 怎么开一个做网站的工作室局域网访问wordpress
  • 网站工作和网站建设管理工作东莞沙田门户网站建设
  • 商户网站唯一订单号邢台做移动网站价格
  • 水泥公司网站建设做旅游的网站的需求
  • php网站怎么做缓存信息门户平台
  • 深圳高端做网站公司国内优秀网站欣赏
  • vs做的网站图片显示不了长沙专业网站建设怎么做
  • 何为门户网站网站如何不被收录
  • 杭州首传网站建设公司怎么样阿凡达网站建设网
  • 苏州网站优化哪家好深圳罗湖做网站
  • 建设网站里的会员系统百度云wordpress教程视频
  • mysql 网站空间贵州建设网站
  • 网站建设公司的性质软件项目管理制度
  • 国内f型网页布局的网站pk10代码网站开发
  • 网站分页符怎么做建设一个国外服务器的网站
  • 培训网站平台怎样做网站自身维护
  • 哪里有免费的网站推广wordpress建站社区
  • 深圳网站制作平台博客网
  • 做搬家广告哪家网站有优wordpress 更新文章
  • 网站建设课程学习wordpress 插件开启
  • 做原油的网站深圳百度推广公司