电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

C语言代码大全

C语言代码大全_第1页
1/74
C语言代码大全_第2页
2/74
C语言代码大全_第3页
3/74
------------------------------------------------------------------------摘自 宋鲁生 程序设计大赛 乘法口诀表 #include #include void main(void) { int i,j,x,y; clrscr(); printf("\n\n * * * 乘法口诀表 * * * \n\n"); x=9; y=5; for(i=1;i<=9;i++) { gotoxy(x,y); printf("%2d ",i); x+=3; } x=7; y=6; for(i=1;i<=9;i++) { gotoxy(x,y); printf("%2d ",i); y++; } x=9; y= 6; for(i=1;i<=9;i++) { for(j=1;j<=9;j++) { gotoxy(x,y); printf("%2d ",i*j); y++; } y-=9; x+=3; } printf("\n\n"); } 用一维数组统计学生成绩 #include void main() { char SelectKey,CreditMoney,DebitMoney; while(1) { do{ clrscr(); puts("========================="); puts("| Please select key: |"); puts("| 1. Quary |"); puts("| 2. Credit |"); puts("| 3. Debit |"); puts("| 4. Return |"); puts("========================="); SelectKey = getch(); } while( SelectKey!='1' && SelectKey!='2' && SelectKey!='3' && SelectKey!='4' ); switch(SelectKey) { case '1': clrscr(); puts("================================"); puts("| Your balance is $1000. |"); puts("| Press any key to return... |"); puts("================================"); getch(); break; case '2': do{ clrscr(); puts("=================================="); puts("| Please select Credit money: |"); puts("| 1. $50 |"); puts("| 2. $100 |"); puts("| 3. Return |"); puts("=================================="); CreditMoney = getch(); } while( CreditMoney!='1' && CreditMoney!='2' && CreditMoney!='3' ); switch(CreditMoney) { case '1': clrscr(); puts("========================================="); puts("| Your Credit money is $50,Thank you! |"); puts("| Press any key to return... |"); puts("========================================="); getch(); break; case '2': clrscr(); puts("=========================================="); puts("| Your Credit money is $100,Thank you! |")...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

C语言代码大全

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部