An electronics company sells circuit boards at a 40 percent profit, If you know the retail price of a circuit board, you can calculate its profit with the following formula:
- Profit = Retail price x 0.4
Write a program that asks the user for the retail price of a circuit board calculates the amount of profit earned for that product, and displays the result on the screen.
Breaking it down
- When displaying the output, instead of concatenating the $ symbol, what other way could you format the number?
- Instead of using Scanner, which other way could you write this program for user interaction?