Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class TicTacToe
- {
- static void Main()
- {
- long x = int.Parse(Console.ReadLine());
- int y = int.Parse(Console.ReadLine());
- int firstValue = int.Parse(Console.ReadLine());
- int c;
- int index;
- int value1 = firstValue;
- int value2 = firstValue + 1;
- int value3 = firstValue + 2;
- int value4 = firstValue + 3;
- int value5 = firstValue + 4;
- int value6 = firstValue + 5;
- int value7 = firstValue + 6;
- int value8 = firstValue + 7;
- int value9 = firstValue + 8;
- if (x == 0 && y == 0)
- {
- c = value1;
- index = 1;
- }
- else if (x == 0 && y == 1)
- {
- c = value2;
- index = 2;
- }
- else if (x == 0 && y == 2)
- {
- c = value3;
- index = 3;
- }
- else if (x == 1 && y == 0)
- {
- c = value4;
- index = 4;
- }
- else if (x == 1 && y == 1)
- {
- c = value5;
- index = 5;
- }
- else if (x == 1 && y == 2)
- {
- c = value6;
- index = 6;
- }
- else if (x == 2 && y == 0)
- {
- c = value7;
- index = 7;
- }
- else if (x == 2 && y == 1)
- {
- c = value8;
- index = 8;
- }
- else
- {
- c = value9;
- index = 9;
- }
- Console.WriteLine(Math.Pow(c, index));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement