#include<stdio.h>
int main()
{
int a,b,c;
printf("Input three numbers:");
scanf("%d %d %d", &a, &b,&c);
printf("max=%d\n", (a>b?a:b)>c?(a>b?a:b):c);
return 0;
}
0.0分
1 人评分
#include<stdio.h> int main() { int max; int a,b,c; printf("请输入三个数:\n"); scanf("%d %d %d",&a,&b,&c); max=a>b?a:b; max=c>max?c:max; printf("Max is %d",max); return 0; } 这样为什么是错的。
#include<stdio.h> int main() { int a,b,c; printf("Input three numbers:"); scanf("%d %d %d", &a, &b,&c); printf("max=%d\n", (a>b?a:b)>c?(a>b?a:b):c); return 0; } 大神,我只想知道为神马我这代码总是显示答案错误?在别的编译器里都能正确输入输出?
#include<stdio.h> int main() { int a,b,c; printf("Input three numbers:"); scanf("%d %d %d", &a, &b,&c); printf("max=%d\n", (a>b?a:b)>c?(a>b?a:b):c); return 0; }
点我有惊喜!你懂得!浏览:1200 |
C二级辅导-进制转换 (C语言代码)浏览:505 |
程序员的表白 (C语言代码)浏览:1413 |
C语言程序设计教程(第三版)课后习题5.7 (C语言代码)浏览:816 |
蓝桥杯历届试题-九宫重排 (C++代码)浏览:2756 |
C语言程序设计教程(第三版)课后习题9.4 (Java代码)浏览:1367 |
十->二进制转换 (C语言代码)浏览:1272 |
C语言程序设计教程(第三版)课后习题5.7 (C语言代码)浏览:725 |
printf基础练习2 (C语言代码)浏览:927 |
A+B for Input-Output Practice (V) (C语言代码)浏览:612 |