LePetitGlacon

FICHE 5 BASE Exercice 6

Oct 14th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 KB | None | 0 0
  1. using System;
  2.  
  3. namespace p
  4. {
  5.     class Program
  6.     {
  7.         public static void Main(string[] args)
  8.         {
  9.             Console.WriteLine("combien de ligne d'étoiles ?");
  10.             int nombre1 = int.Parse(Console.ReadLine());
  11.          
  12.             string etoile = "*";
  13.             int compteur1 = 0;
  14.            
  15.                 while (compteur1 != nombre1)
  16.                 {
  17.                     Console.WriteLine(etoile);
  18.                     etoile = "*" + etoile;
  19.                     compteur1++;
  20.                 }
  21.             Console.ReadKey();
  22.         }
  23.     }
  24. }
Add Comment
Please, Sign In to add comment