Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please solve this Problem with c code, and without the use of tables. Question S (15 marks). Write a program that stores multiplication tables from
Please solve this Problem with c code, and without the use of tables.
Question S (15 marks). Write a program that stores multiplication tables from 1 to 9 na 2-dimensional array. You should not use scanf to enter the values -each element of the 2D array must be assigned the appropriate value (using assignment statements). It then prompts the user to enter a choice. The choice must be a number between 0 and 9. If the user enters any other number, then the program prints a message saying that it is an invalid number If choice entered is 0, the program displays the multiplication tables from 1 to 9 as shown in the sample output below. The output must be exactly as shown below. The line of stars has 80 stars (*) in it. You may use t (for tab) and n (for newline) to get the correct spacing in the output. If the choice entered is a number between 1 and 9 (both inclusive), the program must print the muliplication table for that number as shown in the sample input/output below Your program must repeat this as long as the user wishes to continue. Please follow the sample input/output for further clarification. Call your source code file Name the c file "lastnameFirstnameA2Q5.C". (Ritu's file would be called chaturvediRituA2Q5.c) Sample Input/ output: Enter zero (o) to see ail multiplication tables from 1 - 9 OR Enter a specific number between 1 and 9 t see its multiplication table Enter a choice: 2 Printing multiplication table for 2: 2 x 3- 6 2 x 4- 8 2 X 510 2 X 6-12 2 X 7-14 2X8=16 2x9=18 Do you wish to continue? Ente y for yes, any othr character for no: y Enter zero (0) to see all multiplication tables from 1 -9 OR Enter a specific number between 1 and 9 to see its multiplcation table Enter a choice: 0 Printing Multiplication Tables 1-9 One Three Four Five Six Seven Eight Nine One Three 3 Four Five 5 Six Seven 7 Eight 8 Nine 10 12 14 16 18 12 15 18 21 24 27 12 16 20 24 28 32 36 10 15 20 25 30 35 40 12 18 24 30 36 42 48 54 14 21 28 35 42 49 56 63 32 40 48 56 64 72 27 36 45 54 63 72 81 Do you wish to continue? Enter y for yes, any other character for no: n Good ByeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started