Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* http://www.hsin.hr/skolska2007/zadaci/bas_pas/druga/zadaci.pdf */
- #include <iostream>
- using namespace std;
- main()
- {
- // 1 2 3 4 3 2 1 2 3 4 3 2 1
- int t;
- cin >> t;
- while (t>5)
- t = t - 6;
- switch(t){
- case 0: cout << "1" << endl; break;
- case 1: cout << "2" << endl; break;
- case 2: cout << "3" << endl; break;
- case 3: cout << "4" << endl; break;
- case 4: cout << "3" << endl; break;
- case 5: cout << "2" << endl; break;
- }
- system ("PAUSE");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement