for(int i=0; i<10; i++) { WriteLine("saisir une valeur"); int valeur = Convert.ToInt32(ReadLine()); if(valeur == 50){ WriteLine("Bingo! FOUND!"); break; } }
bool found = false; int tentatives = 0; while(!found && ++tentatives <= 10) { WriteLine("saisir une valeur"); int valeur = Convert.ToInt32(ReadLine()); if(valeur == 50){ WriteLine("Bingo! FOUND!"); found = true; } }
return
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)