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 ConsoleApp2
- {
- class Program
- {
- private static int Numb;
- static void Main(string[] args)
- {
- Console.WriteLine("Размер");
- Numb = Convert.ToInt32(Console.ReadLine());
- for (int x = 0; x < Numb; x++)
- {
- for (int y = 0; y < Numb; y++)
- {
- Console.SetCursorPosition(x, y);
- int min = x < y ? x : y;
- int max = x > y ? x : y;
- if (x + y < Numb)
- {
- Console.Write(min + 1);
- }
- else
- {
- Console.Write(Numb - max);
- }
- }
- }
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement