Question: c++ Given integer variables seedVal and highestInput, seed the pseudorandom number generator with seedVal. Then, generate four random numbers in the range 1 to highestInput

c++

Given integer variables seedVal and highestInput, seed the pseudorandom number generator with seedVal. Then, generate four random numbers in the range 1 to highestInput and output an equation of the form "A - B * C + D = X", where A, B, C, and D are the randomly generated numbers, and X is the solution to the equation. End with a newline.

Ex: If highestInput is 9, then a possible output is:

5 - 8 * 4 + 3 = -24 

Note: srand() should be called only once at the start.

#include #include using namespace std;

int main() { int seedVal; int highestInput; int A; int B; int C; int D;

cin >> seedVal; cin >> highestInput; /* Your code goes here */ return 0; }

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!