SharedSage genom exempel / summa.cOpen in CoCalc
Author: Robert Nyqvist
1
#include <stdio.h>
2
3
int main(void)
4
{
5
int S, k;
6
S = 0;
7
for (k = 1; k <= 12345; k++) {
8
S += k;
9
}
10
printf("Summa: %d\n", S);
11
return 0;
12
}