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;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int p = 1;
- for (int i = 1; i <= 5; i++)
- {
- for (int j = 1; j <= i; j++)
- {
- Console.Write(p);
- p -= 1;
- }
- p = i + 1;
- Console.WriteLine();
- }
- int n = 4;
- p = n;
- for (int i = 1; i <= 4; i++)
- {
- for (int j = 4; j >= i; j--)
- {
- Console.Write(p);
- p -= 1;
- }
- p = n - 1;
- n -= 1;
- Console.WriteLine();
- }
- Console.ReadKey();
- }
- }
- }
Add Comment
Please, Sign In to add comment