Question: Task: please write a program to implement a 3 * 3 matrix containing the integers from 1 to 9 . Then when a user inputs

Task: please write a program to implement a 3*3 matrix containing the integers from 1 to 9. Then when a user inputs an integer, a new 3*3 matrix should be generated with each cell multiplied by that integer. An example of the output is shown as follows: ./a.out The old matrix is: 123456789 Please input an integer: 2 The new matrix is: 24681012141618 Details: The program should include two-dimensional arrays. The format of the new matrix should have cells that are right-aligned. The input integer should be in range (1 to 20). If the user inputs an out-range number, please return a out of the range (1 to 20) to user. PN08

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!