The teacher asked the students, will you do the problem? If the student answers "Yes", you can go to school. If the student does not do (n), then the teacher tells again and asks the student if he will do it.
(1) Until the students ' union, they can only school.
(2) until the student council or the teacher told him 10 times not, all have to school (code 7)
Console.WriteLine ("Will it be?"); String a = Console.ReadLine (); if (a = = "Y") { Console.WriteLine ("School"); } for (int i = 0; i < i++) { Console.WriteLine ("Will It Be"); A = Console.ReadLine (); if (a = = "Y") { goto FX; } } FX: Console.WriteLine ("Press Any to build school"); Console.readkey ();
Use the While statement to determine
Console.WriteLine ("Will do It"); String a = Console.ReadLine (); if (a = = "Y") { Console.WriteLine ("School"); } int i=0; while (a!= "y" && i<10) { Console.WriteLine ("Will do It"); String B = Console.ReadLine (); if (b = = "Y") { Console.WriteLine ("After School"); break; } i++; } Console.readkey ();
The teacher asked the students while judging