WAP in java to input the name of the commodity, quantity, price and then
calculate the total amount
Answers
Answered by
3
Answer:
Steps
Create a separate variable to store the value of the sum. This can be of the type int.
The formula to find the sum is: Sum = First Number + Second Number.
To get these parameters (inputs) from the user, try using the Scanner function in Java.
Formula to calculate cost price if selling price and profit percentage are given: CP = ( SP * 100 ) / ( 100 + percentage profit). Formula to calculate cost price if selling price and loss percentage are given: CP = ( SP * 100 ) / ( 100 – percentage loss ).
Similar questions