source: CIVL/mods/dev.civl.abc/examples/adder_seq.c

main
Last change on this file was aad342c, checked in by Stephen Siegel <siegel@…>, 3 years ago

Performing huge refactor to incorporate ABC, GMC, and SARL into CIVL repo and use Java modules.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5664 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 258 bytes
RevLine 
[aad342c]1#pragma TASS input int B
2#define B 10
3#pragma TASS input {n>=0 && n<=B} int n
4#define n 10
5#pragma TASS input
6double a[n];
7#pragma TASS output
8double sum;
9
10void main() {
11 double result = 0.0;
12 int i;
13
14 for (i=0; i<n; i++) result += a[i];
15 sum = result;
16}
Note: See TracBrowser for help on using the repository browser.