Answers for "c# while vs do while"

C#
5

do while loop in c#

do {
  Console.WriteLine("Emter the magic word");
  magic_string = Console.ReadLine();
  if(magic_string != "please");{
	 Console.WriteLine("{0} is not the corret magic word try again:- ",magic_string );
  }
}while ( magic_string != "please");
Posted by: Guest on October-30-2021
1

difference between while and do while in c#

//While statement
while ( condition) {
statements;  //body of loop
}
// do-while statement
do{
.
statements  // body of loop.
.
} while( Condition );
Posted by: Guest on August-19-2021

C# Answers by Framework

Browse Popular Code Answers by Language