
帮忙看一下这段程序哪儿出错了吧?谢谢了 build 时候显示1error
#include<studio.h>voidmain(){inta=3,b=4,c=5;floatx=1.200000,y=2.400000,z=-3.600000;lo...
#include <studio.h>
void main()
{
int a=3,b=4,c=5;
float x=1.200000,y=2.400000,z=-3.600000;
long int u=51274,n=128765;
char c1='a',c2='b';
printf("a=%2d b=%2d c=%2d\n",a,b,c);
printf(x+y=%5.2f y+z=%5.2f z+x=%5.2f\n",x+y,y+z,z+x);
printf("u=%6.5ld n=%9.6ld\n",u,n);
printf("c1=%c or %d\n",c1);
printf("c2=%c or %d\n",c2);
}
我是用visual c++调试的 初学者 所以不大懂 展开
void main()
{
int a=3,b=4,c=5;
float x=1.200000,y=2.400000,z=-3.600000;
long int u=51274,n=128765;
char c1='a',c2='b';
printf("a=%2d b=%2d c=%2d\n",a,b,c);
printf(x+y=%5.2f y+z=%5.2f z+x=%5.2f\n",x+y,y+z,z+x);
printf("u=%6.5ld n=%9.6ld\n",u,n);
printf("c1=%c or %d\n",c1);
printf("c2=%c or %d\n",c2);
}
我是用visual c++调试的 初学者 所以不大懂 展开
展开全部
#include <stdio.h>
void main()
{
int a=3,b=4,c=5;
float x=(float)1.200000,y=(float)2.400000,z=(float)-3.600000;
long int u=51274,n=128765;
char c1='a',c2='b';
printf("a=%2d b=%2d c=%2d\n",a,b,c);
printf("x+y=%5.2f y+z=%5.2f z+x=%5.2f\n",x+y,y+z,z+x);
printf("u=%6.5ld n=%9.6ld\n",u,n);
printf("c1=%c or %d\n",c1);
printf("c2=%c or %d\n",c2);
}
void main()
{
int a=3,b=4,c=5;
float x=(float)1.200000,y=(float)2.400000,z=(float)-3.600000;
long int u=51274,n=128765;
char c1='a',c2='b';
printf("a=%2d b=%2d c=%2d\n",a,b,c);
printf("x+y=%5.2f y+z=%5.2f z+x=%5.2f\n",x+y,y+z,z+x);
printf("u=%6.5ld n=%9.6ld\n",u,n);
printf("c1=%c or %d\n",c1);
printf("c2=%c or %d\n",c2);
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询