Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace SecondProjet
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("c koi ton prénom ?");
- String prenom = Console.ReadLine();
- String verdict = "admis(e)";
- int moy = -1;
- while (moy < 0 || moy > 20)
- {
- Console.WriteLine("c koi ta moyenne (0-20) ?");
- try
- {
- moy = int.Parse(Console.ReadLine());
- }
- catch (FormatException e)
- {
- Console.WriteLine("wtf c pas un nombre");
- break;
- }
- catch (OverflowException e)
- {
- Console.WriteLine("wtf c koi ça");
- break;
- }
- }
- if (moy >= 0 && moy <= 20)
- {
- if (moy < 9)
- verdict = "recalé(e)";
- else if (moy < 10) verdict = "rattrapé(e)";
- }
- Console.WriteLine(prenom + " ben t'es " + verdict);
- Console.ReadLine(); //Pause
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement