Showing
1 changed file
with
14 additions
and
1 deletions
| 1 | #include<stdio.h> | 1 | #include<stdio.h> |
| 2 | +#include<string.h> | ||
| 3 | + | ||
| 4 | +void exitfunc() | ||
| 5 | +{ | ||
| 6 | + char a[80]; | ||
| 7 | + | ||
| 8 | + do{ | ||
| 9 | + scanf("%s",a); | ||
| 10 | + }while(strcmp("exit",a)); | ||
| 11 | +}//C | ||
| 2 | 12 | ||
| 3 | int main(){ | 13 | int main(){ |
| 4 | - printf("push push baby\n"); | 14 | + printf(" push push baby\n Type exit to exit\n"); |
| 15 | + | ||
| 16 | + exitfunc(); | ||
| 17 | + | ||
| 5 | return 0; | 18 | return 0; |
| 6 | } | 19 | } | ... | ... |
-
Please register or login to post a comment