啊哈磊_编程从这里起步
标题:
求助 为什么运行了是空白
[打印本页]
作者:
皆非
时间:
2020-12-30 10:14
标题:
求助 为什么运行了是空白
#include<stdio.h>
struct Student
{
int num;
char name[20];
float score;
};
int main()
{
struct Student student1,student2;
scanf("%d,%s,%f",&student1.num,student1.name,&student1.score);
scanf("%d,%s,%f",&student2.num,student2.name,&student2.score);
printf("the high score is:");
if(student1.score>student2.score)
{
printf("%d%s%f",student1.num,student1.name,student1.score);
}
else if(student1.score<student2.score)
{
printf("%d%s%f",student2.num,student2.name,student2.score);
}
else
{
printf("%d%s%f",student1.num,student1.name,student1.score);
printf("%d%s%f",student2.num,student2.name,student2.score);
}
return 0;
}
复制代码
欢迎光临 啊哈磊_编程从这里起步 (https://bbs.codeaha.com/)
Powered by Discuz! X3.2