Advertisement
Guest User

Untitled

a guest
Feb 19th, 2020
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.51 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <conio.h>
  3. #include "headers.h"
  4.  
  5. int main() {
  6.     printf("Choose the problem(0 to exit):\n");
  7.     printf("1. problem 1 version 1\n");
  8.     printf("2. problem 1 version 2\n");
  9.     char c = '*';
  10.     while (c < '0' || c > '2') {
  11.         c = getch();
  12.         if (c == '1') version1();
  13.         else if (c == '2') version2();
  14.         else if (c == '0') {
  15.             printf("Successfully exit\n");
  16.             break;
  17.         } else
  18.             printf("Error\n");
  19.     }
  20.  
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement