1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace variables
  7. {
  8. class demo
  9. {
  10. static void Main(string[] args)
  11. {
  12. Console.WriteLine("enter value of n");
  13. int n = Convert.ToInt32(Console.ReadLine());
  14. for (int i = n; i >= 1; i--)
  15. for (int j = 1; j <= i; j++)
  16. {
  17. Console.Write(j);
  18. }
  19. }
  20. Console.ReadLine();
  21. }
  22. }
  23. }
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace variables
  7. {
  8. class demo
  9. {
  10. static void Main(string[] args)
  11. {
  12. Console.WriteLine("enter value of n");
  13. int n = Convert.ToInt32(Console.ReadLine());
  14. for (int i = n; i >= 1; i--)
  15. {
  16. Console.WriteLine(" ");
  17. for (int j = 1; j <= i; j++)
  18. {
  19. Console.Write(" ");
  20. }
  21. for (int q = i; q <= n; q++)
  22. {
  23. Console.Write(" * ");
  24. }
  25. }
  26. Console.ReadLine();
  27. }
  28. }
  29. }