谁会此程序注释
#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++;
}
}
}
}