Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.42 KB | None | 0 0
  1. // Exercise 5.3 Programming Principles Week 5
  2.  
  3. using System;
  4.  
  5. public class Triangle
  6. {
  7.     public static void Main()
  8.     {  
  9.         string input; int parse; int count = 0;
  10.        
  11.         Console.Write("Please senter the number of asterisks: ");
  12.         input = Console.ReadLine();
  13.         parse = int.Parse(input);
  14.            
  15.         for (int i = parse; count <= parse; count++)
  16.         {
  17.             string s = new string('*', count);
  18.             Console.WriteLine(s);
  19.         }
  20.  
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement