Advertisement
Guest User

Untitled

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