#include <stdio.h>
#include <stdlib.h>
int main()
{
float a,b,c,d,e;
a=1.2;
b=2.3;
c=3.4;
d=4.5;
e=a+b+c+d
printf("%f",e);
system("pause");
return 0;
}
需要改几次,1是集合为int,2是e=a+b+C+D后面有分隔号;
正确为
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a,b,c,d,e;
a=1.2;
b=2.3;
c=3.4;
d=4.5;
e=a+b+c+d;
printf("%d",e);
system("pause");
return 0;
}
|