/*不停地输入整数并求出它们的平均值*/
#include<stdio.h>
int main(void)
{
int retry,sum=0,count=0;
do{
int no;
printf("请输入一个整数:");
scanf("%d",&no);
sum = sum+no;
count = count+1;
printf("是否要继续?【Yes···0/No···1】");
scanf("%d",&retry);
} while(retry == 0);
printf("和为%d,平均值为%.2f\n",sum,(double)sum/count);
return 0;
}