Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Implement this code using C 3. Write a function with the following prototype int obtain_user_integer_input( const char *prompt ); that can be used as int

Implement this code using C

image text in transcribedimage text in transcribedimage text in transcribed

3. Write a function with the following prototype int obtain_user_integer_input( const char *prompt ); that can be used as int low_row, low_col; low_row - obtain_user_integer_input ("Enter low row number: "); low col = obtain user integer input ("Enter low column number: "); to get the row and column information from the user. Your program should support any row and column numbers between -15 and +15. 4. Your obtain user integer input() function should ensure the number entered is in the appropriate range, and prompt the user again with an error message and a new request for input if it is not. This function should only return when a valid integer is entered. 5. Write a dedicated function to get the supported operator from the user. Use the prototype char obtain_operator_input void This function should display all the available operators and then validate the input entered is a valid operator. If it is invalid, your function should prompt again for a valid operator. This function should only return when a valid operator is entered. X X / D % addition subtraction multiplication also multiplication also multiplication division, but with integer results modulus row value raised to the column power column root of the row value help: display the operators that are supported by your program (this list). division P r h 6. When the program completes displaying a table, prompt the user to see if they want to run again. Continue to iterate until the user signals they are done. 7. Run your program at least once for each operator, using different ranges to demonstrate it works correctly for each This function should display all the available operators and then validate the input entered is a valid operator. If it is invalid, your function should prompt again for a valid operator. This function should only return when a valid operator is entered. X / D % addition subtraction multiplication also multiplication also multiplication division division, but with integer results modulus row value raised to the column power column root of the row value help: display the operators that are supported by your program (this list). r h 6. When the program completes displaying a table, prompt the user to see if they want to run again. Continue to iterate until the user signals they are done. 7. Run your program at least once for each operator, using different ranges to demonstrate it works correctly for each. Sample Runs Here's a sample of a single run of the program. Enter low row number: 1 Enter high row number: 3 Enter low column number: 1 Enter high column number: 4 Enter operation: + 1 2 2 3 3 4 1 2 3 4 5 6 7 4 5 6 ** Table Complete ** In the following example, the numbers at the top in red are the columns that go from 1 to 5 in steps of 1, and the first row are the numbers that go from -3 to 4 in steps of 1. The program automatically changed the operator from X to the more standard *. Sample Runs Here's a sample of a single run of the program. Enter low row number: 1 Enter high row number: 3 Enter low column number: 1 Enter high column number: 4 Enter operation: + + 1 2 3 1 2 3 4. 2 3 4 5 3 4 5 6 4 5 6 7 ** Table Complete ** In the following example, the numbers at the top in red are the columns that go from 1 to 5 in steps of 1, and the first row are the numbers that go from -3 to 4 in steps of 1. The program automatically changed the operator from X to the more standard * Enter low row number: -3 Enter high row number: 4 Enter low column number: -1 Enter high column number: 5 Enter operation: X * 1 -3 -2 -1 2 -6 -4 -3 -2 -1 0 1 2 3 4 -1 3 2 1 0 -1 -2 -3 -4 0 0 0 0 0 0 0 0 0 3 -9 -6 -3 0 3 6 9 12 0 2 4 6 8 4 -12 -8 -4 0 4 8 12 16 5 -15 -10 -5 0 5 10 15 20 1 2 3 4 ** Table Complete **

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

Database Application Development And Design

Authors: Michael V. Mannino

1st Edition

0072463678, 978-0072463675

More Books

Students also viewed these Databases questions

Question

Developing and delivering learning that is integrated with the job.

Answered: 1 week ago

Question

Use of assessments to determine trainees learning styles.

Answered: 1 week ago