Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- void doit() {
- printf("Hello World\n");
- }
- int goAgain() {
- char ch;
- printf("Again? (Y/N): ");
- scanf(" %c", &ch);
- return (ch=='Y' || ch=='y');
- }
- int main() {
- for(;;)/> { /* infinite loop */
- doit();
- if (!goAgain()) { break; }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement