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
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.
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
Hindi,
7 months ago
Math,
7 months ago
Biology,
1 year ago
Social Sciences,
1 year ago
Math,
1 year ago
Computer Science,
1 year ago
Math,
1 year ago