#include <stdio.h>
int main()
{
int total=0, num=0;
printf("정수 입력(0 to quit): ");
scanf("%d", &num);
total +=num;
while(num!=0){
printf("정수 입력(0 to quit): ");
scanf("%d", &num);
total +=num;
}
printf("합계: %d \n", total);
// do
// {
// printf("정수 입력(0 to quit): ");
// scanf("%d", &num);
// total +=num;
// }while(num!=0);
// printf("합계: %d \n", total);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: