Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program to calculate the purchase price of shares of stock. Ask the user for the number of shares of stock ( as an

Write a program to calculate the purchase price of shares of stock. Ask the user for the number of shares of stock (as an integer), and the price per share of stock (as a double). Then calculate and display the amount of money it would take to purchase the stock. Have a blank line between the input and the output. Follow the 3 steps in the Information Processing Cycle - Input, Processing, and Output. Make sure the output dollar amount is formatted to 2 decimal places, and don't forget the ending punctuation.
Have a blank line at the end of your program to separate the last line of output from your program from the "Press any key to continue ...", and do this for all programs that you write.
Example Run #1:
(bold type is what is entered by the user)
Enter the number of shares of stock: 73
Enter the dollar amount per share: $65.38
The amount of money needed to purchase 73 shares of stock at $65.38 is $x..
The example run shows EXACTLY how your program input and output will look.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899

More Books

Students also viewed these Databases questions