Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- using namespace std;
- int main()
- {
- int liczba, menu;
- cout << "Podaj liczbe" << endl;
- cin >> setbase(0) >> liczba;
- do{
- cout << "Co zrobic?" << endl;
- cout << "1. Podac nowa liczbe" << endl;
- cout << "2. Wyswietlic w systemie dziesietnym" << endl;
- cout << "3. Wyswietlic w systemie osemkowym" << endl;
- cout << "4. Wyswietlic w systemie szesnastkowym" << endl;
- cout << "5. Juz nic nie chcesz" << endl;
- cin >> menu;
- switch(menu)
- {
- case 1: cin >> setbase(0) >> liczba; break;
- case 2: cout << showbase << dec << liczba << endl; break;
- case 3: cout << showbase << oct << liczba << endl; break;
- case 4: cout << showbase << hex << liczba << endl; break;
- case 5: cout << " Zakonczyles program"; break;
- default : cout <<" Zly numer, sprobuj jeszcze raz" << endl;
- }
- }
- while (menu != 5);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement