问题 314 分
保存
12.补足程序,实现如下功能:从键盘上输入若干个学生的成绩,统计并输出最高成绩和最低成绩,当输入负数时结束输入。
void main()
{ floatscore, max=0, min=100;
printf(“ Input the score”);
scanf( “ %f”, &score);
while (
(1)
)
{if ( score > max)max=score;
if (
(2)
)min=score;
printf(“ Input the score”);
scanf( “ %f”, &score);
}
printf(“ Themaxscoreis%f\nminis%f\n”,max, min);
}
问题 324 分
保存
13.以下程序的功能是实现从键盘输入一组字符,统计出大写字母的个数m和小写字母的个数n,并输出m、n中的较大者。
voidmain()
{ intm= 0, n=0;
char c;
while ( (
(1)
) != ‘\n’ )
{if( c>=’A’ &&c =’a’ &&c
void main()
{charstr[]="1a2b3c" ;int i;
for (i=0; str!='\0';i++)
if (str>='0'&&str
void main()
{charstr[][10]={"ABCD","EFGH","IJKL","MNOP"},k;
for (k=1; kint main(){ int month[13] = { 0, 31, 28, 31, 30, 31, 30,31, 31, 30, 31, 30, 31 }; int y, m, d; int i, day; int special_year; scanf("%d%d%d", &y, &m, &d); if(y % 400 == 0 || y % 1
|