source:
CIVL/mods/dev.civl.com/examples/library/stdio/scanfExit.cvl@
cb4d4f4
| Last change on this file since cb4d4f4 was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 235 bytes | |
| Rev | Line | |
|---|---|---|
| [4bba163] | 1 | #include<stdio.h> |
| 2 | #include<civlc.cvh> | |
| 3 | ||
| 4 | int main(){ | |
| 5 | int a = 1, b = 2, c = 3; | |
| 6 | ||
| [410ae2b] | 7 | scanf("%d", &a); |
| 8 | fscanf(stdin, "%d", &b); | |
| [4bba163] | 9 | if(b == 0) |
| 10 | $exit(); | |
| [410ae2b] | 11 | fscanf(stdin, "%d", &c); |
| 12 | printf("a=%d, b=%d, c=%d\n", a, b, c); | |
| [4bba163] | 13 | return 0; |
| 14 | } |
Note:
See TracBrowser
for help on using the repository browser.
