SHARE
TWEET

Przeróbka liczb

Geronimonon Oct 16th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <conio.h>
  4. using namespace std;
  5.  
  6. int main ()
  7.  
  8. {
  9.     int w=-1,a;
  10.         system("cls");
  11.         cout<<"Podaj liczbe: ";
  12.         cin>>a;
  13.         cout<<endl<<"Wybierz w jakim systemie ma byc reprezentowana:"<<endl<<"8- osemkowy"<<endl<<"16- szesnastkowy"<<endl<<"0- wyjscie"<<endl;
  14.         cin>>w;
  15.         if (w==8)
  16.             cout<<"Liczba "<<a<<" w systemie osemkowym to "<<oct<<a<<endl;
  17.         if (w==16)
  18.             cout<<"Liczba "<<a<<" w systemie szesnastkowym to "<<hex<<a<<endl;
  19.     return 0;
  20.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top