Answered You can hire a professional tutor to get the answer.

QUESTION

Does this answer satisfy what the teacher is expecting?

Does this answer satisfy what the teacher is expecting?

/*Purpose: Write a console program that will accept a number from the user and then produce a multiplication table output for 1-10 times that number as well as one less than the input number and one more than the input number.

Created by:Shannon D Bullard

Cration Date: 11-March-2018 */

using System;

using static System.Console;

namespace MultiplicationTables2

{

   class Multiplication2

   {

       static void Main()

       {

           int n;

           Console.Write("Enter a positive integer: ");

           n = int.Parse(Console.ReadLine());

           for (int i = 1; i <= 10; ++i)

           {

               Console.Write("n{0} * {1} = {2}", n - 1, i, (n - 1) * i);

           }

           for (int j = 1; j <= 10; ++j)

           {

               Console.Write("n{0} * {1} = {2}", n, j, n * j);

           }

           for (int k = 1; k <= 10; ++k)

           {

               Console.Write("n{0} * {1} = {2}", n + 1, k, (n + 1) * k);

           }

           Console.ReadLine(); // turning input into data and placing onscreen the results

       }

   }

}

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question