Computers and Technology

You decide to buy some stocks for a certain price and then sell them at another price. write a program that determines whether or not the transaction was profitable. here are the details: • take three separate inputs: the number of shares, the purchase price of the stocks, and the sale price, in that order. • you purchase the number of stocks determined by the input. • when you purchase the stocks, you pay the price determined by the input. • you pay your stockbroker a commission of 3 percent on the amount paid for the stocks. • later, you sell the all of the stocks for the price determined by the input. • you pay your stockbroker another commission of 3 percent on the amount you received for the stock. your program should calculate your net gain or loss during this transaction and print it in the following format: if your transaction was profitable (or if there was a net gain/loss of 0) print: "after the transaction, you made 300 dollars." (if, for example, you gained 300 dollars during the transaction.) if your transaction was not profitable, print: "after the transaction, you lost 300 dollars." (if, for example, you lost 300 dollars during the transaction.) use string formatting.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:40, silviamgarcia
Pthreads programming: create and terminate a thread write a c++ program that creates a thread. the main will display a message “hello world from the main”. the main will create a thread that will display a message “hello world from the thread” and then terminates with a call to pthread_exit()
Answers: 3
image
Computers and Technology, 22.06.2019 14:30, binodkharal2048
Hi plz 11 ! when planning a table, what step comes first: "define the column headers" or "calculate the number of columns/rows"? a. calculate the number of columns/rows b. define the column headers
Answers: 1
image
Computers and Technology, 23.06.2019 09:30, rscvsdfsrysas3712
Why is an outfitting a workspace with video games in a technology development company considered a strategic use of money
Answers: 1
image
Computers and Technology, 23.06.2019 16:00, ginaaa20
Which analyst position analyzes information using mathematical models to business managers make decisions?
Answers: 1
Do you know the correct answer?
You decide to buy some stocks for a certain price and then sell them at another price. write a progr...

Questions in other subjects:

Konu
Mathematics, 02.12.2019 01:31