34
Amrish
8y

Let's see the coder in you.
If I give input: 1 output: 2
If I give input: 2 output:1
Only these two test cases needed.
You should not use control structures such as if,else,for,while,switch etc. (The answer is simple) (Don't cheat)

int number;
cin>>number; //get number
cout<<??????; //Your code

Comments
Add Comment