View Code of Problem 30

#include<cstdio>
#include<iostream>
using namespace std;
int main(){
	int sum=0,n;
	while(scanf("%d",&n)!=EOF){
			do{
		sum+=n;
	}while(n--);
	cout << sum;
	}


}

Double click to view unformatted code.


Back to problem 30