Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp9
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = 5;
- for (int j = 1; j <= n; j++)
- {
- for (int i = 1; i <= n; i++)
- {
- if (j == i || i == 5 && j == 1 || i == 4 && j == 2 || i == 2 && j == 4 || i == 1 && j == 5)
- {
- Console.Write("X ");
- }
- else
- {
- Console.Write("O ");
- }
- }
- Console.WriteLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement