Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program 2 Using Loops (Do not use For loop for this program) Stock Transaction Program Last month Joe purchased some stock from Schmoe, Inc. Write

image text in transcribed
Program 2 Using Loops (Do not use For loop for this program) Stock Transaction Program Last month Joe purchased some stock from Schmoe, Inc. Write a program that allows the user to input the followings as many times as he/she wants until the user is done (example it can be 5): 1. The name of the 2. Stock Number of shares Joe bought 3. Stock purchase price 4. Stock selling price Broker commission 5. displays the following paid for the stock(s) that Joe had transacted ( if Joe entered 5 sets of stocks transactions then output 5 sets of stocks). 1. The Name of the Stock 2. The amount of money Joe paid for the stock (number of shares bought purchase price) 3. The amount of commission Joe paid his broker when he bougt: the stock. (Amount he paid for stocks commission in percent) 4. The amount that Jim sold the stock for. (number of shares selling price) 5. The amount of commission Joe paid his broker when he sold the stock. (Amount he sold shares commission in percent) Display the amount of money Joe had left when he sold the stock and paid his broker (both times). If this amount is positive, then Joe made a profit. If the amount is negative, then Joe lost money Profit/loss (amount paid to buy stocks+ commission) - (amount for sold stocks-commission) 6

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

Step: 3

blur-text-image

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

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

More Books

Students also viewed these Databases questions

Question

Find the derivative of y= cos cos (x + 2x)

Answered: 1 week ago

Question

What is the best conclusion for Xbar Chart? UCL A X B C B A LCL

Answered: 1 week ago