Question: c program Program Set 4 You need a program to maintain information about your stocks. Assume that you have the following stocks: Stock Name Yearly

c program
c program Program Set 4 You need a program to maintain information
about your stocks. Assume that you have the following stocks: Stock Name

Program Set 4 You need a program to maintain information about your stocks. Assume that you have the following stocks: Stock Name Yearly Fees IBM ORACLE SUN MICRO LINKSYS CISCO Number of Shares 150 215 355 75 50 Buying Price Per Share $11.33 $10.77 $25.55 $22.34 $45.36 Current Price Per Share $13.33 $12.25 $35.75 $23.34 $50.86 $5.00 $3.50 $12.25 $6.00 $1.50 Write a C program that will perform the following tasks: Task 1: Allow the user to enter in the data for each stock. Stock name, Number of shares, Buy Price, Current Price and Yearly fees.(The user will not enter the $'s.) Task 2: Calculate the initial Cost, Current Cost, and Profit for each stock. The formulas to use are: Initial Cost = Number of Shares Buying Price Per Share Current Cost - Number of Shares Current Price Per Share Profit = Current Cost - Initial Cost - Yearly Fees Task 3: Print out the Stock Name, Initial Cost, Current Cost, and Profit for each stock. Task 4 Calculate and print the total profit for all of the stocks. That is, find the sum of the 5 profits for each stock. represents a blank space Output should look like this: Enter Stock Name: IBM Enter Number of Shares: 150 Enter Buy Price : 11.33 Enter Current Price : 13.33 Enter Yearly Fees: 5.00 The Stock Name Initial Cost Current Cast IBM $ 1699.50 100A Output should look like this: Enter Stock Name : IBM Enter Number of Shares: 150 Enter Buy Price : 11.33 Enter Current Price : 13.33 Enter Yearly Fees: 5.00 The Stock Name Initial Cost Current Cost Profit IBM $ 1699.50 $ 1999.50 $.295.00 Enter Stock Name: ORACLE Enter Number of Shares : 215 Enter Buy Price : 10.77 Enter Current Price : 12.25 Enter Yearly Fees : 3.50 The Stock Name Initial Cost Current Cost Profit ORACLE $_2315.55 $_2633.75 $_314.70 .the rest of the stocks... Repeat the above for the rest of the stocks and then at the last line of output print the total profit for all 5 stocks The Total Profit for the 5 Stocks $._@@@@@@@@

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!