Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace p
- {
- class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Choisissez un nombre");
- int nombre1 = int.Parse(Console.ReadLine());
- int nombre2 = 0;
- int compteur = 1;
- while (nombre1 > 20 || nombre1 < 0)
- {
- if (nombre1 > 20)
- {
- Console.WriteLine("Le nombre est trop grand :)");
- }
- else
- {
- Console.WriteLine("nombre négatif !");
- }
- Console.WriteLine("Choisissez un nombre");
- nombre1 = int.Parse(Console.ReadLine());
- }
- Console.WriteLine("\n\nLe nombre est entre 0 et 20");
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement