Create a program in C# that requests a number (x) and displays 10*x. Must be repeated until the user enters 0.
public class UsingWhile
public static void Main(string args)
int x = Convert.ToInt32(Console.ReadLine());
while (x != 0)
Console.WriteLine(x * 10);
x = Convert.ToInt32(Console.ReadLine());
Practice C# anywhere with the free app for Android devices.
Learn C# at your own pace, the exercises are ordered by difficulty.
Your donations support our work and contribute to the maintenance of the app.
Own and third party cookies to improve our services. If you go on surfing, we will consider you accepting its use.