main
test-branch
|
Last change
on this file since beab7f2 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:
376 bytes
|
| Rev | Line | |
|---|
| [b8821d9] | 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 |
|
|---|
| 11 | int main() {
|
|---|
| 12 | FILE *fpt = fopen("output2.out","a+");
|
|---|
| 13 | int b[5];
|
|---|
| 14 |
|
|---|
| 15 | for(int i=0;i<5;i++) {
|
|---|
| 16 | b[i] = i+1;
|
|---|
| 17 | }
|
|---|
| 18 | #ifdef _CIVL
|
|---|
| 19 | for(int i=0; i<5; i++) {
|
|---|
| 20 | array[i] = b[i];
|
|---|
| 21 | }
|
|---|
| 22 | #else
|
|---|
| 23 | for(int i=0; i<5; i++) {
|
|---|
| 24 | fprintf(fpt,"%d\n",b[i]);
|
|---|
| 25 | }
|
|---|
| 26 | #endif
|
|---|
| 27 | fclose(fpt);
|
|---|
| 28 | }
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.