subject

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.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 13:30
To remove a header or footer from a document you can open the header and footer and manually delete the content true or false
Answers: 1
question
Computers and Technology, 21.06.2019 17:00
Which process would best represent the opposite of exhausting air from a system?
Answers: 2
question
Computers and Technology, 23.06.2019 01:20
Me with this program in c++ ! computers represent color by combining sub-colors red, green, and blue (rgb). each sub-color's value can range from 0 to 255. thus (255, 0, 0) is bright red. (130, 0, 130) is a medium purple. (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (in other word, equal amounts of red, green, blue yield gray).given values for red, green, and blue, remove the gray part. ex: if the input is 130 50 130, the output is: 80 0 80. thus, find the smallest value, and then subtract it from all three values, thus removing the gray.
Answers: 3
question
Computers and Technology, 23.06.2019 06:00
What machine listens for http requests to come in to a website’s domain? a. a router b. a browser c. a server d. a uniform resource locator
Answers: 1
You know the right answer?
You decide to buy some stocks for a certain price and then sell them at another price. write a progr...
Questions
question
Mathematics, 13.12.2021 21:30
question
Mathematics, 13.12.2021 21:30
question
Business, 13.12.2021 21:30
question
Social Studies, 13.12.2021 21:30
question
Mathematics, 13.12.2021 21:30
Questions on the website: 13722360