LePetitGlacon

FICHE 5 BASE Exercice 1

Oct 7th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.46 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("Choisissez un nombre");
  10.             int nombre = int.Parse(Console.ReadLine());
  11.             int boucle = 0;
  12.            
  13.             while (boucle <= 10)
  14.             {
  15.                 nombre = nombre + 1;
  16.                 Console.WriteLine(nombre);
  17.                 boucle = boucle + 1;
  18.             }
  19.             Console.ReadKey();
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment