Advertisement
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 ConsoleApp4
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.ForegroundColor = ConsoleColor.Yellow;
- Console.BackgroundColor = ConsoleColor.Blue;
- Console.Clear();
- int size_x = 13, size_y = 10;
- for (int x = 0; x < size_x; x++)
- {
- // четные - нечетные
- for (int y = 0; y < size_y; y++)
- {
- Console.SetCursorPosition(x, y);
- if ((x + y) % 2 == 0)
- {
- Console.ForegroundColor = ConsoleColor.Green;
- }
- else
- {
- Console.ForegroundColor = ConsoleColor.Red;
- }
- Console.Write('#');
- }
- ///// зеброй
- for (int y = 0; y < size_y; y++)
- {
- Console.SetCursorPosition(x, y);
- if (y % 2 == 0)
- {
- Console.ForegroundColor = ConsoleColor.Green;
- }
- else
- {
- Console.ForegroundColor = ConsoleColor.Red;
- }
- Console.Write('#');
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement