#include <stdio.h> p.197
int main()
{
int i=0,count,total=0, value=0;
printf("How much times you want to add?");
scanf("%d", &count);
do
{
printf("put that number~!\n");
scanf("%d", &value);
total+=value;
++i;
}
while (i<count);
{
printf("%d times of added sum is %d.", count, total);
}
return 0;
}
int main()
{
int i=0,count,total=0, value=0;
printf("How much times you want to add?");
scanf("%d", &count);
do
{
printf("put that number~!\n");
scanf("%d", &value);
total+=value;
++i;
}
while (i<count);
{
printf("%d times of added sum is %d.", count, total);
}
return 0;
}
댓글
댓글 쓰기