Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <conio.h>
- using namespace std;
- int main ()
- {
- int w=-1,a;
- system("cls");
- cout<<"Podaj liczbe: ";
- cin>>a;
- cout<<endl<<"Wybierz w jakim systemie ma byc reprezentowana:"<<endl<<"8- osemkowy"<<endl<<"16- szesnastkowy"<<endl<<"0- wyjscie"<<endl;
- cin>>w;
- if (w==8)
- cout<<"Liczba "<<a<<" w systemie osemkowym to "<<oct<<a<<endl;
- if (w==16)
- cout<<"Liczba "<<a<<" w systemie szesnastkowym to "<<hex<<a<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement