source: CIVL/examples/compare/sumNspec.cvl@ bfebb46

1.23 2.0 main test-branch
Last change on this file since bfebb46 was 36947d1, checked in by Manchun Zheng <zmanchun@…>, 12 years ago

checked the reading an output variable and report an error, tests added accordingly; added README file for examples/MPI; added a hook in UserInterface for GUI.

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

  • Property mode set to 100644
File size: 176 bytes
RevLine 
[b444d36]1#include<civlc.h>
2#include<stdio.h>
3$input int N;
4$output int sum;
5
6void main() {
[36947d1]7 int localsum = 0;
[b444d36]8 for (int i = 1; i <= N; i++) {
[36947d1]9 localsum+=i;
[b444d36]10 }
[36947d1]11 sum = localsum;
[b444d36]12}
Note: See TracBrowser for help on using the repository browser.