Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdio>
- #include <conio.h>
- #include <windows.h>
- #include <math.h>
- using namespace std;
- int m_choice = 1; //glowny wybor z menuu
- float a;
- float b;
- int c;
- int choice2; //wybor w kolejnsci odejmowania
- int choice3; //wybor przy dzieleniu
- int f_choice = 1; //figure choice / wybor typu figury
- int flat_choice =1; //podmennu figur plaskich
- int cube_choice =1; //wybor podmenu kwadratu
- int main()
- {
- while (m_choice != 0)
- {
- cout << "Co Chcialbys Policzyc?" << endl;
- cout << " " << endl;
- cout << "1. Suma" << endl;
- cout << "2. Roznica" << endl;
- cout << "3. Iloczyn" << endl;
- cout << "4. Iloraz" << endl;
- cout << "5. Ulamek" << endl;
- cout << "6. Pierwiastek" << endl;
- cout << "7. Potega" << endl;
- cout << "8. Parzystosc Liczby"<<endl;
- cout << " " << endl;
- cout << "9. Nastepna Strona " << endl;
- cout << " " << endl;
- cout << "0. Wyjdz " << endl;
- cout << " " << endl;
- cin >> m_choice;
- switch (m_choice)
- {
- case 0:
- break;
- case 1:
- cout << "Wybierz a: " << endl;
- cin >>a;
- cout << "Wybierz b: " << endl;
- cin >> b;
- cout << "Wynik Dodawania To: "<<a+b<<endl;
- getch();
- system("cls");
- break;
- case 2:
- cout << "Wybierz a: " << endl;
- cin >>a;
- cout << "Wybierz b: " << endl;
- cin >> b;
- cout << "1.Odejmij a Od b"<<endl;
- cout << "2.Odejmij b Od a"<<endl;
- cin>>choice2;
- switch (choice2)
- {
- case 1:
- cout <<"Wynik Odejmowania To: "<<a-b<<endl;
- getch();
- system("cls");
- break;
- case 2:
- cout <<"Wynik Odejmowania To: "<<b-a<<endl;
- getch();
- system("cls");
- break;
- }
- break;
- case 3:
- cout << "Wybierz a: " << endl;
- cin >>a;
- cout << "Wybierz b: " << endl;
- cin >> b;
- cout <<""<<endl;
- cout <<"Wynik Mnozenia To: "<<a*b<<endl;
- getch();cout << " " << endl;
- system("cls");
- break;
- case 4:
- cout << "Wybierz a: " << endl;
- cin >>a;
- cout << "Wybierz b: " << endl;
- cin >> b;
- cout<<""<<endl;
- cout << "1.Podziel a Przez b"<<endl;
- cout << "2.Podziel b Przez a"<<endl;
- cin >>choice3;
- switch (choice3)
- {
- case 1:
- cout <<"Wynik Dzielenia To: "<<a/b<<endl;
- getch();
- system("cls");
- break;
- case 2:
- cout <<"Wynik Dzielenia To: "<<b/a<<endl;
- getch();
- system("cls");
- break;
- }
- break;
- case 5:
- cout << "Wybierz Mianownik: " << endl;
- cin >>a;
- cout << "Wybierz Licznik: " << endl;
- cin >> b;
- cout <<""<<endl;
- cout<<"Rozwiniecie Tego Ulamka To: "<<a/b<<endl;
- getch();
- system("cls");
- break;
- case 6:
- cout << "Wprowadz a: "<<endl;
- cin >> a;
- cout << "Wprowadz Stopien Pierwiastka: "<<endl;
- cin >> b;
- cout <<""<<endl;
- cout << pow(a, 1/b);
- getch();
- system("cls");
- break;
- case 7:
- cout << "Wprowadz a: "<<endl;
- cin >> a;
- cout << "Wprowadz Potege: "<<endl;
- cin >> b;
- cout <<""<<endl;
- cout << pow(a, b);
- getch();
- system("cls");
- break;
- case 8:
- cout <<"Podaj Liczbe Do Sprawdzenia: "<<endl;
- cin >>c;
- if(c%2==0)
- {
- cout <<"Podana Liczba Jest Parzysta"<<endl;
- }
- else
- {
- cout <<"Podana Liczba Nie Jest Parzysta"<<endl;
- }
- getch();
- system("cls");
- break;
- case 9:
- system("cls");
- cout <<"---------------------------------"<<endl;
- cout <<" Kalkulator Bryl "<<endl;
- cout <<"---------------------------------"<<endl;
- cout << " " << endl;
- cout << "Co Chcialbys Policzyc?" << endl;
- cout << " " << endl;
- cout << "1. Figury Plaskie" << endl;
- cout << ""<<endl;
- cout << "2. Bryly" << endl;
- cin >>f_choice;
- system("cls");
- switch(f_choice)
- {
- case 1:
- cout << "Wybierz Figure: " << endl;
- cout << " " << endl;
- cout << "1. Kwadrat" << endl;
- cout << "2. Prostokat" << endl;
- cout << "3. Trojkat" << endl;
- cout << "4. Trapez" << endl;
- cout << "5. Romb" << endl;
- cout << "6. Kolo" << endl;
- cout << " " << endl;
- cout << "8. Poprzednia Strona"<<endl;
- cout << "9. Nastepna Strona " << endl;
- cout << " " << endl;
- cout << "0. Wyjdz " << endl;
- cout << " " << endl;
- cin >>flat_choice;
- system("cls");
- switch(flat_choice)
- {
- case 1:
- cout <<"1. Oblicz Pole"<<endl;
- cout <<"2. Oblicz Obwod"<<endl;
- cout <<"3. Oblicz Brakujace Ramie"<<endl;
- cin>>cube_choice;
- switch(cube_choice)
- {
- case 1:
- system("cls");
- cout <<"Podaj a: "<<endl;
- cin >> a;
- cout <<"Pole Wynosi: "<<a*a<<endl;
- }
- getch();
- system("cls");
- break;
- }
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement