#include <stdio.h>
int main()
{
int sum = 0;
int cnt = 0;
int retry;
do{
int t;
printf("请输入一个整数:");
scanf("%d",&t);//取地址t
sum = sum + t;
cnt = cnt + 1;
printf("是否继续?<1...继续/0...放弃>:");
scanf("%d",&retry); //取地址retry
}while (retry == 0);
printf("和为%d,平均值:%.2f。\n",sum,(double)sum/ cnt);
return 0;
}