Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int answer;
- int num1 = 120;
- int num2 = 3;
- char symbol = '/';
- bool tzodek = false;
- Console.WriteLine("Answer The Question Below:\n{0} {1} {2} = ?", num1, symbol, num2);
- answer = int.Parse(Console.ReadLine());
- if (symbol == '+')
- {
- if (answer == num1 + num2)
- {
- tzodek = true;
- }
- }
- else if (symbol == '-')
- {
- if (answer == num1 - num2)
- {
- tzodek = true;
- }
- }
- else if (symbol == '*')
- {
- if (answer == num1 * num2)
- {
- tzodek = true;
- }
- }
- else if (symbol == '/')
- {
- if (answer == num1 / num2)
- {
- tzodek = true;
- }
- }
- if (tzodek == true)
- {
- Console.WriteLine("To---Oooov!!!");
- }
- else
- {
- Console.WriteLine("Efes...");
- }
- Console.ReadLine();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement