source: CIVL/examples/experimental/out1.c

main
Last change on this file was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

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

  • Property mode set to 100644
File size: 345 bytes
Line 
1#ifdef _CIVL
2#include <civlc.cvh>
3#endif
4
5#include<stdio.h>
6
7#ifdef _CIVL
8$output int array[20];
9#endif
10
11int main() {
12 FILE *fpt = fopen("output1.out","a+");
13 int a[5]={1,2,3,4,5};
14
15#ifdef _CIVL
16 for(int i=0; i<5; i++) {
17 array[i] = a[i];
18 }
19#else
20 for(int i=0; i<5; i++) {
21 fprintf(fpt,"%d\n",a[i]);
22 }
23#endif
24 fclose(fpt);
25}
26
27
Note: See TracBrowser for help on using the repository browser.