MCPcopy Create free account
hub / github.com/IBM/Project_CodeNet / main

Function main

tools/spt-generator/examples/c/gauss.c:9–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include <stdlib.h>
8#include <assert.h>
9int main(int n, char **argv)
10{
11 assert(n==2);
12 int i, sum = 0;
13 int last = atoi(argv[1]);
14 for ( i = 1; i <= last; i++ ) {
15 sum += i;
16 }
17 printf("sum = %d\n", sum);
18 return 0;
19}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected