int i = 1; while(i != 0) { //This code will loop Console.WriteLine("Say a number"); i = int.Parse(Console.ReadLine()); }