Advertisement
KirillKorobka

Untitled

Dec 17th, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp9
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int n = 5;
  10.  
  11. for (int j = 1; j <= n; j++)
  12. {
  13. for (int i = 1; i <= n; i++)
  14. {
  15. if (j == i || i == 5 && j == 1 || i == 4 && j == 2 || i == 2 && j == 4 || i == 1 && j == 5)
  16. {
  17. Console.Write("X ");
  18. }
  19. else
  20. {
  21. Console.Write("O ");
  22. }
  23. }
  24. Console.WriteLine();
  25. }
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement