write a program to calculate of profit after reading cost price and selling price through keyboard.(java)
pls don't spam its urgent!!!!
Answers
Answered by
10
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);
}
}
I am java learner.
Pls mark me brainlest@and follow me on Instagram,I'd is on my profile.
Similar questions