For C++ The first TODO is to gather the necessary input from the user to complete the story. Create the variables that you will need; be mindful of which data types to use! Remember that string input should use getline instead of just cin by itself. The second TODO is to display the story once again, but now with the values entered by the user. This is where you will use the variables you made previously. The third TODO is to seed the random number generator using the current system time. We will need this in order for the next section to work. The fourth TODO is to create a visual graph of the stock price fluctuating. You will need to use the setfill and setw stream manipulators to make this work. The stock price value determines how many of the symbols to display. Make sure to round the price to the nearest dollar so that the chart is as accurate as possible. There are five fluctuations that you need to model in your program: The stock price is multiplied by a random number between 2 and 4 (inclusive) The stock price is divided by a random number between 2 and 4 (inclusive) The stock price is added by a random number between 2 and 4 (inclusive) The stock price is subtracted by a random number between 2 and 4 (inclusive) The stock price is multiplied by a random number between 2 and 4 (inclusive) You need to use the random formula to generate the random numbers needed above. After each fluctuation, display the updated stock graph. The final TODO is to print out the final stock price after all the fluctuations. Since we are talking about money, make sure that the output is properly formatted (only contains two decimal values).

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter2: Using Data
Section: Chapter Questions
Problem 4E: In this chapter, you learned that although a double and a decimal both hold floating-point numbers,...
icon
Related questions
Question
100%

For C++

The first TODO is to gather the necessary input from the user to complete the story. Create the variables that you will need; be mindful of which data types to use! Remember that string input should use getline instead of just cin by itself.

The second TODO is to display the story once again, but now with the values entered by the user. This is where you will use the variables you made previously.

The third TODO is to seed the random number generator using the current system time. We will need this in order for the next section to work.

The fourth TODO is to create a visual graph of the stock price fluctuating. You will need to use the setfill and setw stream manipulators to make this work. The stock price value determines how many of the symbols to display. Make sure to round the price to the nearest dollar so that the chart is as accurate as possible. There are five fluctuations that you need to model in your program:

  1. The stock price is multiplied by a random number between 2 and 4 (inclusive)
  2. The stock price is divided by a random number between 2 and 4 (inclusive)
  3. The stock price is added by a random number between 2 and 4 (inclusive)
  4. The stock price is subtracted by a random number between 2 and 4 (inclusive)
  5. The stock price is multiplied by a random number between 2 and 4 (inclusive)

You need to use the random formula to generate the random numbers needed above. After each fluctuation, display the updated stock graph.

The final TODO is to print out the final stock price after all the fluctuations. Since we are talking about money, make sure that the output is properly formatted (only contains two decimal values).

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Concept of pointer parameter
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr