Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main ()
- {
- char znak;
- int a;
- cin >> znak;
- switch(znak)
- {
- case '0':
- cout << "0";
- break;
- case '1':
- cout << "1";
- break;
- case '2':
- cout << "2";
- break;
- case '3':
- cout << "3";
- break;
- case '4':
- cout << "4";
- break;
- case '5':
- cout << "10";
- break;
- case '6':
- cout << "11";
- break;
- case '7':
- cout << "12";
- break;
- case '8':
- cout << "13";
- break;
- case '9':
- cout << "14";
- break;
- case 'a':
- cin >> a;
- cout << "15";
- break;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement