given that the cost price of an article is rupees 60. 25 and is sold for Rs 89.75 write a program that calculates the profit percent of the sale using the formula profit percentage =profit/ CP ×100 where profit = SP- CP
Ankit02:
Name The Platform ?
Answers
Answered by
65
Your Answer :-
class Price
{
public static void main ()
{
double cp = 60.25;
double sp = 89.75 ;
double profit = sp-cp;
double percent = profit / cp * 100 ;
System.out.println ( + percent );
}
}
I have given a basic program if u want the use of Scanner or Buffer Reader tell me in Comments section .
I will provide u Further info ......
# Be Brainly
Attachments:
there is no rule that adding String args is compulsion .
It is used in complex .
The given one is a basic just for learning and as u can see in the lappy screen
chatting in comments will disturb the other users .
Answered by
34
public class Program{
public static void main(String...args){
double cp=60.25;
double sp=89.75;
double profit=sp-cp;
double profitPercantage=(profit*100)/cp;
System.out.println("Profit Percentage: "+profitPercentage);
}
}
Similar questions