Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. using System;
  2. namespace ConsoleApp1
  3. {
  4. class Program
  5. {
  6.  
  7. static void Main(string[] args)
  8. {
  9. Console.WriteLine("podaj liczbe wierszy: ");
  10. int liczba = int.Parse(Console.ReadLine());
  11. for (int i = 1; i <= liczba; i++)
  12. {
  13.  
  14. for(int j = liczba - i + 1;j>1; j--)
  15. {
  16. Console.Write(" ");
  17. }
  18. for(int y = 1; y <= i; y++)
  19. {
  20. Console.Write("*");
  21. }
  22. Console.WriteLine();
  23. }
  24.  
  25. }
  26.  
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement