source:
CIVL/examples/compare/sumNspec.cvl@
bfebb46
| Last change on this file since bfebb46 was 36947d1, checked in by , 12 years ago | |
|---|---|
|
|
| File size: 176 bytes | |
| Line | |
|---|---|
| 1 | #include<civlc.h> |
| 2 | #include<stdio.h> |
| 3 | $input int N; |
| 4 | $output int sum; |
| 5 | |
| 6 | void main() { |
| 7 | int localsum = 0; |
| 8 | for (int i = 1; i <= N; i++) { |
| 9 | localsum+=i; |
| 10 | } |
| 11 | sum = localsum; |
| 12 | } |
Note:
See TracBrowser
for help on using the repository browser.
