Advertisement
XfreeBG

Untitled

Sep 6th, 2022
13
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.62 KB | Source Code | 0 0
  1. int n = int.Parse(Console.ReadLine());
  2.             for (int a = 1; a <= n; a++)
  3.             {
  4.                 if (a != 1)
  5.                 {
  6.                     Console.WriteLine("");
  7.                 }
  8.                 for(int d = 0; d < n-a; d++)
  9.                 {
  10.                     Console.Write(" ");
  11.                 }
  12.                 for(int b = 1; b < a; b++)
  13.                 {
  14.                     Console.Write("*");
  15.                 }
  16.                 Console.Write("I");
  17.                 for (int c = 1; c < a; c++)
  18.                 {
  19.                     Console.Write("*");
  20.                 }
  21.             }
Tags: C#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement