Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //int y (1 or 2)
- int x = 1;
- if(y == 2) x = 2;
- //bool y (true or false)
- bool x = true;
- if(y) x = false;
- int x = (y == 2 ? 2 : 1);
- bool x = (y ? false : true);
- bool x = !y;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement