Q:

Write an 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

0

Write an 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.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using static System.Console;

namespace _7_MultiplicationTable
{
    class MultiplicationTable
    {
        static void Main(string[] args)
        {
            WriteLine("MultiplicationTable");
            
            int entry = 0;
            Write("Enter number:");
            entry = int.Parse(ReadLine());
            for (int i = 1; i <= 10; ++i)
            {
                WriteLine("{0,3} x {1,2} = {2}",i,entry,i*entry);
            }

            WriteLine("--End--");
        }
    }
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now