主题:小问题一个
#include <stdio.h>
void main(void)
{
int a=1,b=2,c=3;
int a2=1234,b2=2345,c2=3456;
int a3=1111,b3=2222,c3=3333;
int y=(a+b+c)/3;
int y2=(a2+b2+c2)/3;
int y3=(a3+b3+c3)/3;
printf("\n the average is %d",y);
printf("\n the average is %d",y2);
printf("\n the average is %d",y3);
getchar();
}
我实在不知道哪错了,用了2种编译器都构建不出来。
void main(void)
{
int a=1,b=2,c=3;
int a2=1234,b2=2345,c2=3456;
int a3=1111,b3=2222,c3=3333;
int y=(a+b+c)/3;
int y2=(a2+b2+c2)/3;
int y3=(a3+b3+c3)/3;
printf("\n the average is %d",y);
printf("\n the average is %d",y2);
printf("\n the average is %d",y3);
getchar();
}
我实在不知道哪错了,用了2种编译器都构建不出来。