Question: C++ PROGRAM Write a program that displays a table of x and y values for a function y = f(x) = 2x-5. The x and
| C++ PROGRAM Write a program that displays a table of x and y values for a function y = f(x) = 2x-5. |
| The x and y values are stored in a 2d dynamic array of ints, which has two rows. |
The first row is x values, the second is matching y values
| Ask the user for how many x -y pairs of values. |
| This will determine the size of your |
| array (number of columns). |
Here is a sample output
| Displays xy table for y = f(x) = 2x-5 |
How many xy pairs of values :6
1 2 3 4 5 6
-5 -3 -1 1 3 5
| Write a function with prototype int f(int x) which is called for each x value, to |
| determine the y value. |
| The x values are always 1, 2, 3, 4 ... |
Make sure to delete the memory
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
