Computer Science, asked by shibupaul, 1 year ago

Create an application in java to accept cp and sp display message you made a profit or loss depending in input value

Answers

Answered by AnshJaaiswalAj
2
import java.util.*
class cpsp
{
public static void main(String args[ ] )
{
Scanner sc=new scanner(System.in)
int a=sc.nextInt( );
System.out.println("enter cp");
Scanner ab=new scanner (system.in)
int b=sc.nextInt( );
System.out.println("Enter sp");
int c,d;
if(a>b)
{
System.out.println("Profit made..");
}
else if(a<b)
{
System.out.println("loss beared ");
}
}
}
This is full coding of program condition mentioned by you . if it's fruitful then follow and Mark as brain list.
thanks.



Similar questions