fork download
  1. #include <iostream>
  2. #include <stdio.h>
  3. #include <cstdlib>
  4. #include <conio.h>
  5. #include<iomanip>
  6. #include <math.h>
  7.  
  8. using namespace std;
  9.  
  10. long double x,y;
  11. char wybor;
  12.  
  13. int main()
  14. {
  15.  
  16. for(;;)
  17. {
  18.  
  19. cout << "Podaj 1 liczbe: ";
  20. cin >> x;
  21. cout << "Podaj 2 liczbe: ";
  22. cin >> y;
  23. cout<<setprecision(100000);
  24.  
  25. cout<<endl;
  26. cout << "MENU GLOWNE" << endl;
  27. cout << "-----------------" << endl;
  28. cout << "1. Dodawanie" << endl;
  29. cout << "2. Odejmowanie" << endl;
  30. cout << "3. Mnozenie" << endl;
  31. cout << "4. Dzielenie" << endl;
  32. cout << "5. Koniec programu" << endl;
  33.  
  34.  
  35. cout << endl;
  36. wybor=getch();
  37.  
  38. switch(wybor)
  39. {
  40.  
  41. case '1':
  42. cout<<"Suma = "<<x+y;
  43. break;
  44.  
  45. case '2':
  46. cout<<"Roznica = "<<x-y;
  47. break;
  48.  
  49. case '3':
  50. cout<<"Iloczyn = "<<x*y;
  51. break;
  52.  
  53. case '4':
  54. if (y==0) cout << "Nie dzielimy przez zero!";
  55. else cout<<"Iloraz = "<<x/y;
  56. break;
  57.  
  58. case '5':
  59. exit(0);
  60. break;
  61.  
  62. default: cout<<"Nie ma takiej opcji w menu!";
  63. }
  64. getchar();getchar();
  65. system("cls");
  66. }
  67. return 0;
  68. }
  69.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:4:19: fatal error: conio.h: No such file or directory
 #include <conio.h>
                   ^
compilation terminated.
stdout
Standard output is empty