Advertisement
xDelik

Untitled

Oct 18th, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.93 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdio>
  3. #include <conio.h>
  4. #include <windows.h>
  5. #include <math.h>
  6.  
  7. using namespace std;
  8.  
  9. int m_choice = 1; //glowny wybor z menuu
  10. float a;
  11. float b;
  12. int c;
  13. int choice2; //wybor w kolejnsci odejmowania
  14. int choice3; //wybor przy dzieleniu
  15. int f_choice = 1; //figure choice / wybor typu figury
  16. int flat_choice =1; //podmennu figur plaskich
  17. int cube_choice =1; //wybor podmenu kwadratu
  18.  
  19. int main()
  20. {
  21. while (m_choice != 0)
  22. {
  23. cout << "Co Chcialbys Policzyc?" << endl;
  24. cout << " " << endl;
  25. cout << "1. Suma" << endl;
  26. cout << "2. Roznica" << endl;
  27. cout << "3. Iloczyn" << endl;
  28. cout << "4. Iloraz" << endl;
  29. cout << "5. Ulamek" << endl;
  30. cout << "6. Pierwiastek" << endl;
  31. cout << "7. Potega" << endl;
  32. cout << "8. Parzystosc Liczby"<<endl;
  33. cout << " " << endl;
  34. cout << "9. Nastepna Strona " << endl;
  35. cout << " " << endl;
  36. cout << "0. Wyjdz " << endl;
  37. cout << " " << endl;
  38.  
  39. cin >> m_choice;
  40.  
  41. switch (m_choice)
  42. {
  43. case 0:
  44. break;
  45. case 1:
  46. cout << "Wybierz a: " << endl;
  47. cin >>a;
  48. cout << "Wybierz b: " << endl;
  49. cin >> b;
  50. cout << "Wynik Dodawania To: "<<a+b<<endl;
  51.  
  52. getch();
  53.  
  54. system("cls");
  55. break;
  56.  
  57. case 2:
  58. cout << "Wybierz a: " << endl;
  59. cin >>a;
  60. cout << "Wybierz b: " << endl;
  61. cin >> b;
  62. cout << "1.Odejmij a Od b"<<endl;
  63. cout << "2.Odejmij b Od a"<<endl;
  64.  
  65. cin>>choice2;
  66.  
  67. switch (choice2)
  68. {
  69. case 1:
  70. cout <<"Wynik Odejmowania To: "<<a-b<<endl;
  71. getch();
  72. system("cls");
  73. break;
  74. case 2:
  75. cout <<"Wynik Odejmowania To: "<<b-a<<endl;
  76. getch();
  77. system("cls");
  78. break;
  79. }
  80. break;
  81.  
  82. case 3:
  83. cout << "Wybierz a: " << endl;
  84. cin >>a;
  85. cout << "Wybierz b: " << endl;
  86. cin >> b;
  87.  
  88. cout <<""<<endl;
  89. cout <<"Wynik Mnozenia To: "<<a*b<<endl;
  90.  
  91. getch();cout << " " << endl;
  92. system("cls");
  93. break;
  94.  
  95. case 4:
  96. cout << "Wybierz a: " << endl;
  97. cin >>a;
  98. cout << "Wybierz b: " << endl;
  99. cin >> b;
  100. cout<<""<<endl;
  101. cout << "1.Podziel a Przez b"<<endl;
  102. cout << "2.Podziel b Przez a"<<endl;
  103.  
  104. cin >>choice3;
  105.  
  106. switch (choice3)
  107. {
  108. case 1:
  109. cout <<"Wynik Dzielenia To: "<<a/b<<endl;
  110. getch();
  111. system("cls");
  112. break;
  113. case 2:
  114. cout <<"Wynik Dzielenia To: "<<b/a<<endl;
  115. getch();
  116. system("cls");
  117. break;
  118. }
  119. break;
  120.  
  121. case 5:
  122. cout << "Wybierz Mianownik: " << endl;
  123. cin >>a;
  124. cout << "Wybierz Licznik: " << endl;
  125. cin >> b;
  126. cout <<""<<endl;
  127. cout<<"Rozwiniecie Tego Ulamka To: "<<a/b<<endl;
  128. getch();
  129. system("cls");
  130. break;
  131.  
  132. case 6:
  133. cout << "Wprowadz a: "<<endl;
  134. cin >> a;
  135. cout << "Wprowadz Stopien Pierwiastka: "<<endl;
  136. cin >> b;
  137. cout <<""<<endl;
  138. cout << pow(a, 1/b);
  139.  
  140. getch();
  141. system("cls");
  142. break;
  143.  
  144. case 7:
  145. cout << "Wprowadz a: "<<endl;
  146. cin >> a;
  147. cout << "Wprowadz Potege: "<<endl;
  148. cin >> b;
  149. cout <<""<<endl;
  150. cout << pow(a, b);
  151.  
  152.  
  153. getch();
  154. system("cls");
  155. break;
  156.  
  157. case 8:
  158. cout <<"Podaj Liczbe Do Sprawdzenia: "<<endl;
  159. cin >>c;
  160. if(c%2==0)
  161. {
  162.  
  163. cout <<"Podana Liczba Jest Parzysta"<<endl;
  164. }
  165. else
  166. {
  167.  
  168. cout <<"Podana Liczba Nie Jest Parzysta"<<endl;
  169. }
  170. getch();
  171. system("cls");
  172. break;
  173.  
  174. case 9:
  175. system("cls");
  176. cout <<"---------------------------------"<<endl;
  177. cout <<" Kalkulator Bryl "<<endl;
  178. cout <<"---------------------------------"<<endl;
  179. cout << " " << endl;
  180. cout << "Co Chcialbys Policzyc?" << endl;
  181. cout << " " << endl;
  182. cout << "1. Figury Plaskie" << endl;
  183. cout << ""<<endl;
  184. cout << "2. Bryly" << endl;
  185. cin >>f_choice;
  186. system("cls");
  187.  
  188.  
  189. switch(f_choice)
  190. {
  191. case 1:
  192.  
  193. cout << "Wybierz Figure: " << endl;
  194. cout << " " << endl;
  195. cout << "1. Kwadrat" << endl;
  196. cout << "2. Prostokat" << endl;
  197. cout << "3. Trojkat" << endl;
  198. cout << "4. Trapez" << endl;
  199. cout << "5. Romb" << endl;
  200. cout << "6. Kolo" << endl;
  201. cout << " " << endl;
  202. cout << "8. Poprzednia Strona"<<endl;
  203. cout << "9. Nastepna Strona " << endl;
  204. cout << " " << endl;
  205. cout << "0. Wyjdz " << endl;
  206. cout << " " << endl;
  207. cin >>flat_choice;
  208. system("cls");
  209.  
  210.  
  211. switch(flat_choice)
  212. {
  213. case 1:
  214. cout <<"1. Oblicz Pole"<<endl;
  215. cout <<"2. Oblicz Obwod"<<endl;
  216. cout <<"3. Oblicz Brakujace Ramie"<<endl;
  217.  
  218. cin>>cube_choice;
  219.  
  220. switch(cube_choice)
  221. {
  222. case 1:
  223. system("cls");
  224. cout <<"Podaj a: "<<endl;
  225. cin >> a;
  226. cout <<"Pole Wynosi: "<<a*a<<endl;
  227.  
  228. }
  229.  
  230.  
  231.  
  232.  
  233. getch();
  234. system("cls");
  235. break;
  236.  
  237.  
  238.  
  239. }
  240.  
  241.  
  242.  
  243.  
  244. }
  245.  
  246.  
  247.  
  248. }
  249. }
  250.  
  251. return 0;
  252. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement