write a program to claculate of profit after reading cost price and selling price through keywords
Answers
Answered by
0
Explanation:
import java.util.*;
class Profit
{
public static void main()
{
int cost,selling price,profit=0;
Scanner sc-new Scanner (System.in);
System.out.println("Enter your Cost price"); cost=sc.nextInt();
System.out.println("Enter your Selling price");
selling_price=sc.nextInt();
profit=cost-selling_price;
System.out.println("Profit is "+profit);
}
}
Similar questions