为什么这个程序无法运行?
#include<stdio.h>
main()
{
int a,b,c,d,e;
printf("please enter a,b,c,d :\n");
scanf("%d%d%d%d%d",&a,&b,&c,&d);
if (a<b)
a=a;
else
e=a;
a=b;
b=e;
if (a<c)
a=a;
else
e=a;
a=c;
c=e;
if (a<d)
a=a;
else
e=a;
a=d;
d=e;
if (b<c)
b=b;
else
e=b;
b=c;
c=e;
if (b<d)
b=b;
else
e=b;
b=d;
d=e;
if (c<d)
c=c;
else
e=c;
c=d;
d=e;
printf ("%d%d%d%d",a,b,c,d);
}
#include<stdio.h> main() { int a,b,c,d,e; printf("please enter a...
main(){ int a,b,c,d,e;printf("please enter a,b,c,d :\\n");scanf("%d%d%d",&a,&b,&c,&d);if (a<b)a=a;else {e=a;a=b;b=e;} if (a<c)a=a;else {e=a;a=c;c=e;} if (a<d)a=a;else {e=a;a=d;d=e;} if (b<c)b=b;else {e=b;b=c;c=e;...
我要提 #clude<stdio.h> main() { inta,b,c; scanf("%2d%2d%2d",&a...
C:\\Program Files\\Microsoft Visual Studio\\Common\\TOOLS C:\\Program Files\\Microsoft Visual Studio\\Common\\TOOLS\\WINNT include files:C:\\Program Files\\Microsoft Visual Studio\\VC98\\INCLUDE C:\\Program Files\\Microsoft Visual Studio\\VC98\\MFC\\INCLUDE C:\\Program Files\\Microsoft Visual Studio\\VC98\\...
#include <stdio.h> int main(void){ int a,b,c; printf("Please inp...
include <stdio.h>int main(void){int a,b,c;printf("Please input a,b");scanf("%d,%d",&a,&b);c=a+b;printf("%d+%d=%d\\n",a,b,c);}这个代码就是计算两个值的和并打印出来,例如:Please input a,b10,2 10+2=12 望采纳。
# includestdio.h) main() { int a; flolt b; long unsigned int c...
回答:\/\/这里的错误太多了!不分行写且不说了,很多基本的格式都写错了.看看我的解释吧. \/\/# include(stdio.h)\/\/这里包含的文件不能用圆括号,应该用尖括号,应该改成下面的语句 #include<stdio.h> main() { int a; float b; \/\/long unsigned int c; unsigned long int c; \/\/printf("...
输入一个五位的正整数,求各位数字之和 怎么用C语言写
include<stdio.h> main(){ int a,b,c,d,e,n;printf("请输入一个五位数:");scanf("%d",&n);a=n\/10000;n=n%10000;b=n\/1000;n=n%1000;c=n\/100;n=n%100;d=n\/10;n=n%10;e=n;printf("五个位数之和为:%d\\n",a+b+c+d+e);} 这个答案够简单了吧,一目了然!!!
# include<stdio.h> int main () { float a,b,c,t; printf("please ent...
把scanf("%f%f",&a写全了!scanf("%f%f%f",&a,&b,&c);
#include<stdio.h> main() { int a,b; scanf("a= %d,b= %d",&a,&b...
实际上,你这程序是没有错的,只不过一点都不人性化。scanf("a= %d,b= %d",&a,&b); 这条输入语句很有问题,它要求输入的格式应该是:a= 3,b= 5 而不是3 5这样就行的,我建议改成 scanf("%d%d",&a,&b);
#include <stdio.h> int main() { int a,b; while(scanf("%d %d",&...
读入整数a,b。直到遇到文件结尾符号(Ctrl+d或ctrl+z)。然后输出a与b的和。
#include <stdio.h> main( ) { int a=2,c=5; printf("a=%d,b=%d \\n...
这说明你对C语言的输入输出还不是很了解。对于 printf("a=%d,b=%d \\n",a,c);来说,d表示格式化输出,其中d表示按int类型输出,输出的变量就是后面的a和c。所以,最后的结果中是不包含%号的。选B才是对的。
#include <stdio.h> int main(void){ float a,b,c,average; printf...
include <stdio.h> int main(void){ float a,b,c,average; \/\/定义4个小数型变量 printf("Please input a b c:"); \/\/在屏幕上显示Please input a b c:scanf("%f%f%f",&a,&b,&c); \/\/等待从键盘输入三个小数 \/*below,have a look of a,b,c*\/ printf("a is %.3f,b is ...