Write an C# application named MultiplicationTable that prompts the user for an integer value, for example 7. Then display the product of every integer from 1 through 10 when multiplied by the entered value. For example, the first three lines of the table might read 1 x 7 = 7, 2 x 7 = 14, and 3 x 7 = 21.
Write an C# application named MultiplicationTable that prompts the user for an integer value, for example 7. Then display the product of every integer from 1 through 10 when multiplied by the entered value. For example, the first three lines of the table might read 1 x 7 = 7, 2 x 7 = 14, and 3 x 7 = 21.

Algorithm:
Step 1 Start.
Step 2 Prompt the user to enter an integer value.
Step 3 Read the user's input and store it as an integer variable called "number".
Step 4 Start a loop that will iterate 10 times, with a loop variable called "i" that starts at 1 and increments by 1 in each iteration.
Step 5 Multiply "i" by "number" to get the product, and store it in a variable called "result".
Step 6 Print out the equation in the format "i x number = result", using string interpolation to substitute the values of "i", "number", and "result" into the string.
Step 7 Repeat steps 4 and 5 for each iteration of the loop, until "i" reaches 10.
Step 8 Wait for user input (optional), then close the console window.
Step 9 End.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images









