题目
Develop a program for students to practice spelling the names English of months.——c语言编程
Develop a program for students to practice spelling the names English of months.The Chinese names of the months are displayed randomly and the student needs to enter the corresponding English names.If the spelling is correct,display “Right”; otherwise display “Wrong”.When the student enters “end”,his score of the achievement is displayed and the program stops.The user interface is shown below.
Develop a program for students to practice spelling the names English of months.The Chinese names of the months are displayed randomly and the student needs to enter the corresponding English names.If the spelling is correct,display “Right”; otherwise display “Wrong”.When the student enters “end”,his score of the achievement is displayed and the program stops.The user interface is shown below.
提问时间:2020-12-24
答案
#include "stdio.h"
char *MNT[] = {"January","Feburary","March","April","May","June","July","August","September","October","November","December"};
void main()
{
char x[0x200] = {0}
srand(time());
while(1)
{
int i = rand()%12;
printf("%d月:",i+1);
scanf(x,"%s",x);
if(strcmp(x,"end")==0)return;
if(strcmp(x,MNT[i])==0)
{
printf("Correct ");
}
else
{
printf("Wrong ");
}
}
}
char *MNT[] = {"January","Feburary","March","April","May","June","July","August","September","October","November","December"};
void main()
{
char x[0x200] = {0}
srand(time());
while(1)
{
int i = rand()%12;
printf("%d月:",i+1);
scanf(x,"%s",x);
if(strcmp(x,"end")==0)return;
if(strcmp(x,MNT[i])==0)
{
printf("Correct ");
}
else
{
printf("Wrong ");
}
}
}
举一反三
已知函数f(x)=x,g(x)=alnx,a∈R.若曲线y=f(x)与曲线y=g(x)相交,且在交点处有相同的切线,求a的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
最新试题
- 1把一个时钟改装成一个玩具钟(如图),使得时针每转一圈,分针转16圈,秒针转36圈.开始时3针重合.问:在时针旋转一周的过程中,3针重合了几次?(不计起始和终止的位置).
- 2She has small eyes My brother has a car I havr long hair 将上句子改为一般疑问句,并做肯定和否定回答
- 3用括号中所给单词的适当形式填空.Uncle john _____ (watch) the VOA news every evening
- 4假如平行四边形的周长是36,面积是?
- 51..It informs the consumer about the fabric used in the production of an article.
- 6请英语高手帮忙改一下下面这个句子吧,我不知道它哪里错了
- 7用英文怎么讲:这不可能!
- 8谁能告诉我化学中有关芳香烃 脂肪烃 芳香族化合物的概念
- 9they ___(到达)the museun at a quarter to nine yesterday.
- 1042度34分36秒+56度25分12秒=?
热门考点
- 1一只熊不小心掉进一个大坑里,坠落的速度是每秒10米,这只熊是什么颜色
- 24x-3.9=4.8x+11怎么解方程
- 3英语达人速进!我们还是朋友吗?用英语怎么说?Are we still friends?
- 41.小红买了面值为50分和230分的邮票共8张,用去九元四角,问53分和230分的邮票各几张?
- 5一个数是由6个一,2个十分之一和3个百分之一组成,这个数用百分数表示写作_,读作_,它的单位是_,含有_个这样的单位.
- 6"我是个动手能力很强的人"英语怎么说?
- 7为了得到函数y=cos2x的函数图像,可以将y=sin(2x-π/6)的图像怎样平移?
- 81这是一颗神奇的树,神奇到令我望而生畏的柳树.2这是一本精彩的书,精彩到(请仿写1)
- 9(x+3)根号下x-2=0
- 10李阿姨买来6米长的彩带编花,每朵花用3/5米的彩带.编好后卖出7朵,还剩多少朵?