Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C programming == 2D Arrays Using the code you wrote for the multiplication table in a previous chapter (or starting afresh if you prefer), write

C programming == 2D Arrays

Using the code you wrote for the multiplication table in a previous chapter (or starting afresh if you prefer), write a program in Visual Studio that

1. Prompts the user for the dimension of the multiplication table

2. Reads in the dimension into int variable n

3. Creates a multiplication table of that size n using a 2D array. (Note: the array must be declared with a fixed size before you populate it -- you cannot use n as in int table[n][n] -- so declare the array with a big size such as 15 at the beginning of the program.)

4. Prints the table as it fills the array with values.

5. Prints the caption "Table in reverse: "

6. Prints the table in reverse. NOTE YOU SHOULD NOT REVERSE THE ARRAY, just print it in reverse by adjusting the for() loop indices to start at the end and decrement. Align columns to width 4. Sample output, assuming the user entered 4:

Enter dimension for multiplication table:

image text in transcribed

1 1 2 3 4 2 2 46 8 3 3 6 9 12 4 4 8 12 16 Table in reverse: * 43 2 1 4 16 128 4 3 12 9 63 2 86 4 2 1 4 3 2 1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Genetic Databases

Authors: Martin J. Bishop

1st Edition

0121016250, 978-0121016258

More Books

Students also viewed these Databases questions

Question

8. Explain the relationship between communication and context.

Answered: 1 week ago