Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class challenge_two
- {
- public static bool logic(bool x, bool y)
- {
- bool answer;
- //Write your code below this
- //Hint: You can make extra variables if need be
- bool not_x = !x;
- bool xor_x = not_x ^ x;
- bool and_xy = xor_x && y;
- answer =! and_xy;
- return answer;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement