标题:编的程序有点问题 求大神指点
取消只看楼主
亲琪琪
Rank: 2
等 级:论坛游民
帖 子:55
专家分:38
注 册:2016-3-12
结帖率:70%
已结贴  问题点数:20 回复次数:0 
编的程序有点问题 求大神指点
# include<stdio.h>
int main()
{
char name[10];
char sex;
double maths,english,computer;
int age;
printf("please enter your name age sex:");
scanf("%s%d %c",&name,&age,&sex);
printf("piease enter your scores(maths,english,computer):");
scanf("%f%f%f",&maths,&english,&computer);
(maths>=90&&english>=90&&computer>=90)?printf("You are excellent\n"):printf("You should study hard\n");
return 0;
}
为什我每次无论输入那三个数  结果都是You should study hard
搜索更多相关主题的帖子: computer english please double return 
2016-03-22 15:47



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-462776-1-1.html




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

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