// 从键盘输入,求5个数的和
#include<stdio.h>
#include<string.h>
void main()
{ int num;
int count=0,total=0;
while(count<5)
{
count++;
printf(" Enter the NO.%d= ",count);
scanf("%d",&num);
total+=num;
}
printf("Total=%d\n",total);
}
// 从键盘输入,求5个数的和
#include<stdio.h>
#include<string.h>
void main()
{ int num;
int count=0,total=0;
while(count<5)
{
count++;
printf(" Enter the NO.%d= ",count);
scanf("%d",&num);
total+=num;
}
printf("Total=%d\n",total);
}