-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDay28_prob2.java
More file actions
55 lines (40 loc) · 1.26 KB
/
Day28_prob2.java
File metadata and controls
55 lines (40 loc) · 1.26 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
Sushant and Virat are playing a game. Virat tells 2 numbers to Sushant, who need to check whether the first is bigger than second. Implement a method boolean isBigger(int a, int b) which returns true if a is bigger than b and false otherwise.
Input Format
Two space separated integer value representing numbers given by Virat.
Constraints
Numbers will lie between 10 and 1000.
Output Format
true/false according to the value returned by the method or will print Invalid Input in case of numbers did not match the constraints.
Sample Input 0
50 40
Sample Output 0
true
Sample Input 1
50 50
Sample Output 1
false
*/
// kirtan jain
import java.io.*;
import java.util.*;
public class Solution {
static boolean isBigger(int a, int b){
if(a>b){
return true;
}
else{
return false;
}
}
public static void main(String[] args) {
/* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */
Scanner sc = new Scanner(System.in);
int a=sc.nextInt(), b=sc.nextInt();
if(a<10 || a>1000 || b<10 || b>1000){
System.out.println("Invalid Input");
return;
}
System.out.println(isBigger(a,b));
}
}