#include <stdio.h>

int main(){
    int n=1;
	int sum=0;
	while(n!=0){ // n == 0의 역.
		scanf("%d", &n); // 사용자로 부터 계속해서 정수 입력.
		sum = sum+n; // 그 값을 계속해서 더해 나간다.
    }
	printf("%d", sum);
	return 0;
		
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: