mirror of
https://github.com/openhwgroup/cvw
synced 2025-01-27 23:14:27 +00:00
14 lines
253 B
C
14 lines
253 B
C
// simple.C
|
|
// David_Harris@hmc.edu 24 December 2021
|
|
// Simple illustration of compiling C code
|
|
|
|
long sum(long N) {
|
|
long result, i;
|
|
result = 0;
|
|
for (i=1; i<=N; i++) result = result + i;
|
|
return result;
|
|
}
|
|
|
|
int main(void) {
|
|
return sum(4);
|
|
} |