Exercise
Repeat Until 0 (Use Do While)
Objetive
Create a C# program that asks the user for a number "x" and displays 10*x. The program must repeat the process until the user enters 0, using "do-while".
Example Code
using System;
public class Exercise21
{
public static void Main()
{
int number;
do
{
Console.Write("Enter a number: ");
number = Convert.ToInt32(Console.ReadLine());
Console.WriteLine(number * 10);
}
while (number != 0);
}
}