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 he'll enter 3. Input that number 4. Declare a...


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

Extracted text: 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 he'll 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 ii. 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 See next page for Sample Run:
I CAUsers\hamriscy Desktop\Final Project Environment.ConsoleApplicationi\DebugiConsoleApplicationi.exe<br>How many stocks will you enter?<br>3<br>Input the name of the stock<br>CompanyA<br>Input the price of the stock on day 1<br>23.67<br>IOput the price of the stock on day 2<br>25.78<br>Input the name of the stock<br>CompanyB<br>Input the price of the stock on day 1<br>2.67<br>Epput the price of the stock on day 2<br>10.8<br>Input the name of the stock<br>CompanyC<br>Input the price of the stock on day 1<br>50.8<br>Input the price of the stock on day 2<br>120.88<br>The stock with the greatest percentage increase is:<br>CompanyB<br>2.67<br>10.8<br>304.494<br>Press any key to continue<br>

Extracted text: I CAUsers\hamriscy Desktop\Final Project Environment.ConsoleApplicationi\DebugiConsoleApplicationi.exe How many stocks will you enter? 3 Input the name of the stock CompanyA Input the price of the stock on day 1 23.67 IOput 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 Epput 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 2.67 10.8 304.494 Press any key to continue

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here