forked from kunalbandale/Java-Programs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBULLBEAR.java
34 lines (27 loc) · 815 Bytes
/
BULLBEAR.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* package codechef; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
// stock value X
// sold at value of Y
// profit | loss | neutral
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t-- > 0) {
int X = sc.nextInt();
int Y = sc.nextInt();
if(X > Y) {
System.out.println("LOSS");
} else if(X < Y) {
System.out.println("PROFIT");
} else {
System.out.println("NEUTRAL");
}
}
}
}