| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 460 人关注过本帖
标题:谁会此程序注释
只看楼主 加入收藏
笑巩
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2011-6-28
结帖率:0
收藏
已结贴  问题点数:10 回复次数:2 
谁会此程序注释
#include"stdio.h"

#include"string.h"

#include"time.h"

#include"stdlib.h"

struct jibie

{

   char y1[20];

char y2[20];

char y3[20];

char y4[20];

}j={"D级 ~不及格哦!","C级 ~还要努力!","B级 ~很不错哦!","A级 ~真的很棒!"};

struct num

{

char chin[20];

char en[30];

int boo;

};

struct num a[30]={

{"好的","good",1},

{"坏的","bad",1},

{"美丽的","beautiful",1},

{"什么","what",1},

{"许多","many",1},   

{"苹果","apple",1},

{"球","ball",1},

{"对的","right",1},

{"错的","wrong",1},

{"保持","keep",1},

{"绿色的","green",1},

{"香蕉","banana",1},

{"书","book",1},

{"伟大的","great",1},

{"快乐","happy",1},

{"一些","some",1},

{"蛋糕","cake",1},

{"商店","shop",1},

{"运气","luck",1},

{"大的","big",1}};

int sum=5,sun=0,sux=0;

void caidan();

void strat();

main()

{

system("COLOR 3f");

caidan();

}

void caidan()

{

int n,k,flag=0;

char u,l;

char yy[20];

printf("\n  欢迎使用教小学生学英语程序!");

 printf("\n  ============================================================\n  |                                                          |");

 printf("\n  |                按0可以进入本软件说明部分                 |\n  |                                                          |");

 printf("\n  |                                      |\n  |                                                          |");

 printf("\n  |                      1.答题                              |\n  |                                                          |");

 printf("\n  |                      2.成绩                              |\n  |                                                          |");

 printf("\n  |                      3.退出                              |\n  |                                                          |");

 printf("\n  ============================================================\n ");

printf("请选这服务种类(0-3):[ ]\b\b");

fflush(stdin);

  scanf("%d",&n);

  if(n==0)

  {

  system("cls");

  printf("\n\n\n\n\n");

  printf("  ===============================产品简介===============================\n");

  printf("\t\t\t本软件为教小学生学英语程序~\n");

  printf("\t\t\t分为4个级别分别为A,B,C,D级~\n");

  printf("\t\t\t初始积分为5分,5分以下为D级~\n");

  printf("\t\t\t5-9~C级9-13~B级13分以上A级~\n");

  printf("\t\t\t     按任意键返回菜单!");

  fflush(stdin);l=getchar();if(k!=NULL){system("cls");caidan();}

  }

if(n<1||n>3)

  {

  printf("*对不起你的选项超出范围!* \n");

  printf("请选择服务种类(0-3):[ ]\b\b");

     fflush(stdin);

  scanf("%d",&n);}

else if(n==1)

do

{  

 strat();

 sun++;

 printf("是否继续答题y/n:\n");

 fflush(stdin);

 u=getchar();

 if(u=='y')

 flag=1;

 else

 {

 system("cls");

 caidan();

 }

}while(flag);

else if(n==2)

{

system("cls");

system("COLOR 3f");

if(sum<5)

strcpy(yy,j.y1);

else if(sum>=5&&sum<9)

strcpy(yy,j.y2);

else if(sum>=9&&sum<13)

strcpy(yy,j.y3);

else if(sum>=13)

strcpy(yy,j.y4);

 printf("\n\t\t\t   本次答题成绩\n");

 printf("\n  ============================================================\n  |                                                          |");

 printf("\n  |                       级别:%s                |\n  |                                                          |",yy);

 printf("\n  |                                      |\n  |                                                          |");

 printf("\n  |                       总数:%d个                           |\n  |                                                          |",sun);

 printf("\n  |                       正确:%d个                           |\n  |                                                          |",sun-sux);

 printf("\n  |                       总分数:%d分                         |\n  |                                                          |",sum);

 printf("\n  ============================================================\n ");

 printf("\t\t\t按任意键返回菜单");

  fflush(stdin);l=getchar();if(k!=NULL){system("cls");caidan();}

}

else if(n==3)

{

 printf("\n");

 printf("\n");

 printf("\n");

 printf("\n");

 printf("\t\t\t欢迎使用次软件! 按任意键退出!\t\n");

 printf("\n");

 printf("\n");

 printf("\n");

 puts("\t\t\t\t\t\t****制作人:冯巩****");

 printf("\n");

 fflush(stdin);;k=getchar();if(k!=NULL)exit(0);               

 }

}

void strat()

{

int m;

char c[20];

srand((unsigned) time(NULL));

m=rand()%20;

if(m%2==0)

{

printf("%s:\n",a[m].en);

fflush(stdin);

scanf("%s",c);

if(strcmp(c,a[m].chin)==0)

{

printf("\n回答正确加一分!\n\n");

sum++;

}

else

{

printf("\n回答错误还有一次修改的几回哦!\n");

printf("%s:\n",a[m].en);

fflush(stdin);

scanf("%s",c);

if(strcmp(c,a[m].chin)==0)

printf("\n修改正确不加分");

else

{

printf("对不起你已经两次回答错误减一分");

sum--;

sux++;

}

}

}

else

{

printf("%s:\n",a[m].chin);

fflush(stdin);

scanf("%s",c);

if(strcmp(c,a[m].en)==0)

{

printf("\n回答正确加一分!\n\n");

sum++;

}

else

{

printf("\n回答错误还有一次修改的几回哦!\n");

printf("%s:\n",a[m].chin);

fflush(stdin);

scanf("%s",c);

if(strcmp(c,a[m].en)==0)

printf("\n修改正确不加分");

else

{

printf("对不起你已经两次回答错误减一分");

sum--;

sux++;

}

}

}

}
搜索更多相关主题的帖子: right include wrong beautiful apple 
2011-06-28 12:06
JackyZhang
Rank: 2
等 级:论坛游民
帖 子:82
专家分:29
注 册:2010-7-12
收藏
得分:5 
基本注释都有了

初生牛犊,望多多照顾!
2011-07-05 11:22
pangding
Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19
来 自:北京
等 级:贵宾
威 望:94
帖 子:6784
专家分:16751
注 册:2008-12-20
收藏
得分:5 
嗯。我也觉得。基本全是 pritnf 呀,没什么太需要注释的地方。
2011-07-05 18:44
快速回复:谁会此程序注释
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.063624 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved