View Code of Problem 30

#include<stdio.h>
void main(){
	int n,s=0;
  while(scanf(("%d",&n))!=EOF){
  	while(n--)
          s+=n;
    printf("%d\n",s);
  }
  	

}

Double click to view unformatted code.


Back to problem 30