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;
- float c;
- int d;
- 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 rectangle_choice=1;
- int triangle_choice=1;
- int trapeze_choice=1;
- 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 >>d;
- if(d%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;
- case 2:
- system("cls");
- cout <<"Podaj a: "<<endl;
- cin >> a;
- cout <<"Obwod Wynosi: "<<a*4<<endl;
- getch();
- system("cls");
- break;
- case 3:
- system("cls");
- cout <<"Z Czego Wyliczyc Brakujace Ramie? "<<endl;
- cout <<"1. Z Obwodu"<<endl;
- cout <<"2. Z Pola"<<endl;
- cin >> a;
- system("cls");
- if (a==1)
- {
- cout<<"Podaj Obwod: "<<endl;
- cin >> a;
- cout<<"Ramie Jest Rowne: "<<a/4<<endl;
- getch();
- system("cls");
- break;
- }
- else
- {
- cout<<"Podaj Pole: "<<endl;
- cin >> a;
- b = 2;
- cout<<"Ramie Jest Rowne: "<<pow(a, 1/b)<<endl;
- getch();
- system("cls");
- break;
- }
- getch();
- system("cls");
- break;
- }
- case 2:
- cout <<"1. Oblicz Pole"<<endl;
- cout <<"2. Oblicz Obwod"<<endl;
- cout <<"3. Oblicz Brakujace Ramie"<<endl;
- cin>>rectangle_choice;
- switch(rectangle_choice)
- {
- case 1:
- system("cls");
- cout <<"Podaj a: "<<endl;
- cin >> a;
- cout <<"Podaj b; "<<endl;
- cin >> b;
- cout <<"Pole Wynosi: "<<a*b<<endl;
- getch();
- system("cls");
- break;
- case 2:
- system("cls");
- cout <<"Podaj a: "<<endl;
- cin >> a;
- cout <<"Podaj b: "<<endl;
- cin >>b;
- cout <<"Obwod Wynosi: "<<a*2+b*2<<endl;
- getch();
- system("cls");
- break;
- case 3:
- system("cls");
- cout <<"Z Czego Wyliczyc Brakujace Ramie? "<<endl;
- cout <<"1. Z Obwodu"<<endl;
- cout <<"2. Z Pola"<<endl;
- cin >> d;
- system("cls");
- switch(d)
- {
- case 1:
- cout <<"Podaj Znane Ramie: "<<endl;
- cin>>a;
- cout <<"Podaj Obwod: "<<endl;
- cin>>b;
- cout <<"Brakujace Ramie Ma Wartosc: "<<a*2-b<<endl;
- getch();
- system("cls");
- break;
- case 2:
- cout <<"Podaj Znane Ramie: "<<endl;
- cin>>a;
- cout <<"Podaj Pole: "<<endl;
- cin>>b;
- cout<<"Brakujace Ramie Ma Wartosc: "<<b/a<<endl;
- getch();
- system("cls");
- break;
- }
- }
- case 3:
- cout <<"1. Oblicz Pole"<<endl;
- cout <<"2. Oblicz Obwod"<<endl;
- cout <<"3. Oblicz Brakujace Ramie"<<endl;
- cin>>triangle_choice;
- {
- switch(triangle_choice);
- {
- case 1:
- cout <<"Podaj a: "<<endl;
- cin>>a;
- cout <<"Podaj h: "<<endl;
- cin>>b;
- cout<<"Pole Jest Rowne: "<<(a*b)/2<<endl;
- case 2:
- cout<<"Czy Trojkat Jest Prostokatny?"<<endl
- cout<<""<<endl;
- cout<<"1. Tak"<<endl;
- cout<<"2. Nie"<<endl;
- cin>>a;
- if(a==1)
- {
- cout<<"Podaj h: "<<endl;
- cin>>a;
- cout<<"Podaj druga przy prostokatna: "<<endl;
- cin>>b;
- sqrt(c)=sqrt(a)+sqrt(b);
- cout<<c;
- break;
- }
- }
- }
- getch();
- system("cls");
- break;
- }
- case 4:
- //trapeze
- cout <<"1. Oblicz Pole"<<endl;
- cout <<"2. Oblicz Obwod"<<endl;
- cout <<"3. Oblicz Brakujace Ramie"<<endl;
- cin>>trapeze_choice;
- switch(trapeze_choice)
- {
- case 1:
- cout <<"Podaj a: "<<endl;
- cin>>a;
- cout <<"Podaj b: "<<endl;
- cin>>b;
- cout <<"Podaj h: "<<endl;
- cin>>c;
- cout <<"Pole Jest Rowne: "<<((a+b)*c)/2<<endl;
- }
- }
- }
- }
- return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement