0

prompt: need the user to input 1st and last values for the table. DIsplay in a column in the table starting with 1st base value that was inputted. Last column has to the ending base value that was entered. I need to make 15 rows of computations. First row should be for 1 times the beginning base , 1 times the (begiing base value +1), through 1 times the ending base value. he last row should be for 15 times the beginning base, 15 times the (beginning base value +1) , through 15 times the ending base value. Base values can range from 2 through 8. Display an aethetically formatted multiplication table

here is what I have so far:

using System;

class Program
{
    static void Main()
    {
           string inValue;
            int baseFirst,
                baseLast;

	for (int a = 1; a < 10; a++)
	{
	    for (int b = 1; b < 10; b++)
	    {
		
		Console.Write((a * b).ToString("1"));
	    }
	   DisplayResults();
	    Console.WriteLine();
	}
    }
}

what should I do from here?!

Thanks

2
Contributors
1
Reply
7
Views
5 Years
Discussion Span
Last Post by ddanbe
0

Well, try to change your for loops to this:

for (int a = 1; a <= 10; a++)
            {
                for (int b = 1; b <= 10; b++)
                {
                    Console.Write("{0}\t",(a * b).ToString());
                }
                //DisplayResults(); display is already done by Write and WriteLine
                Console.WriteLine();
            }

If there are things you don't understand, please ask. :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.