All pastes #170904 Raw Edit

Anonymous

public c v1 · immutable
·published 2006-09-14 21:21 UTC
rendered paste body
#include <stdio.h>main(){    int num, result = 0, i;    scanf("%d", &num); // read the number from the keyboard    for(i = 1; i <= num; i++) { // compute the result        result += i;    }    printf("%d\n", result); // output the result}