Question: Visual studio: C++ Write a program that will: 1. Declare a struct stock a. Name b. Price on Day 1 c. Price on Day 2
Visual studio: C++
Write a program that will:
1. Declare a struct stock
a. Name
b. Price on Day 1
c. Price on Day 2
d. Percent change
2. Ask the user to input how many stocks hell enter
3. Input that number
4. Declare a vector of stocks of that inputted number(step 3)
5. Use a loop that for each stock will
a. Input:
i. Name of Stock
ii. Price on Day 1
iii. Price on Day 2
b. Compute the Percent change
6.Loop that computes the stock whose percentage change increased the most
7. Output the stock in the vector whose percent change increased the most
a. Output all contents of the struct
i. Name
ii. Price on Day 1
iii. Price on Day 2
iv. Percent change
Sample Run:

CAUsers\harriscy Desktop Final Project Environment ConsoleApplicationl\DebuglConsoleApplicationl.exe How many stocks will you enter? 3 Input the name of the stock CompanyA Inpyt the price of the stock on day1 23.67 Input the price of the stock on day 2 25.78 Input the name of the stock CompanyB Input the price of the stock on day 1 2.67 Input the price of the stock on day 2 10.8 Input the name of the stock CompanyC Input the price of the stock on day 1 50.8 Input the price of the stock on day 2 120.88 The stock with the greatest percentage increase is CompanyB 10.8 304.494 Press any key to cont i nue
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
