✅ c# beginner help
Im wanting all of the times tables to list as soon as i click type the number and click enter but its making me click enter to display each time table. Thanks
Console.WriteLine("Enter number to see times table!");
int multiple = Convert.ToInt32(Console.ReadLine());
for (int number = 0; number < 13; number++)
{
Console.ReadLine();
int result = multiple * number; Console.WriteLine($"{number} * {multiple} = {result}"); }
int result = multiple * number; Console.WriteLine($"{number} * {multiple} = {result}"); }
7 Replies
remove the
Console.ReadLine();
line
that method will block (pause your program) until the user presses enter.it closes straight away when i remove it
add one at the end of your code then
but dont have one in the loop
okay will do
yes that makes sense
thanks
np
am i able to close this?
yup,
/close