Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.84 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Chess_Square_Color
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string line = Console.ReadLine();
  10.             int row = int.Parse(Console.ReadLine());
  11.  
  12.             if (line == "a" || line == "c" || line == "e" || line == "g")
  13.             {
  14.                 if (row % 2 == 0)
  15.                 {
  16.                     Console.WriteLine("light");
  17.                 }
  18.                 else
  19.                 {
  20.                     Console.WriteLine("dark");
  21.                 }
  22.             }
  23.             else
  24.             {
  25.                 if (row % 2 == 0)
  26.                 {
  27.                     Console.WriteLine("dark");
  28.                 }
  29.                 else
  30.                 {
  31.                     Console.WriteLine("light");
  32.                 }
  33.             }
  34.         }
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement