Advertisement
Felanpro

C# print chess board

Feb 20th, 2019
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.42 KB | None | 0 0
  1. //Here's the code!
  2.  
  3. using System;
  4.                    
  5. public class Program
  6. {
  7.     public static void Main()
  8.     {  
  9.         string[] Board = new string[64];
  10.        
  11.         for(int x = 0; x < 64; x++)
  12.         {
  13.             Board[x] = " - ";
  14.         }
  15.        
  16.         Board[59] = " * ";
  17.         int counter = 0;
  18.        
  19.         for(int z = 0; z < 8; z++)
  20.         {
  21.             for(int y = 0; y < 8; y++)
  22.             {
  23.                 Console.Write(Board[counter]);
  24.                 counter++;
  25.             }
  26.             Console.WriteLine("\n");
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement