Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication4
- {
- class Program
- {
- static void Main(string[] args)
- {
- const int SIZE = 8;
- //go through rows
- for (int i = 0; i < SIZE; i++)
- {
- //go through columns
- for (int j = 0; j < SIZE; j++)
- {
- //alternate X's and O's
- if (i % 2 == j % 2) Console.Write("X");
- else Console.Write("O");
- }
- //end the row
- Console.WriteLine();
- }
- //wait for user response to kill program
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment