/******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, OCaml, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.
*******************************************************************************/
#include <stdio.h>
int main()
{
int sum = 0;
int input;
while(1){
printf("숫자를 입력하시오 (-1을 입력하면 종료)");
scanf("%d",&input);
if(input == -1){
break;
}
sum +=input;
}
printf("입력된 숫자의 합계는 %d 입니다.\n",sum);
return 0;
}