编程输入任意三个整数,求它们的和及平均值
发布网友
发布时间:2024-10-16 06:52
我来回答
共1个回答
热心网友
时间:2024-10-16 11:45
#include <stdio.h>
void main()
{
int i1,i2,i3,sum,avg;
scanf("%d",&i1);
scanf("%d",&i2);
scanf("%d",&i3);
sum=i1+i2+i3;
avg=sum/3;
printf("sum is %d\n",sum);
printf("avg is %d\n",avg);
getch();
}