A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
21
Task/Integer-comparison/Java/integer-comparison.java
Normal file
21
Task/Integer-comparison/Java/integer-comparison.java
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import java.io.*;
|
||||
|
||||
public class compInt {
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
|
||||
|
||||
int nbr1 = Integer.parseInt(in.readLine());
|
||||
int nbr2 = Integer.parseInt(in.readLine());
|
||||
|
||||
if(nbr1<nbr2)
|
||||
System.out.println(nbr1 + " is less than " + nbr2);
|
||||
|
||||
if(nbr1>nbr2)
|
||||
System.out.println(nbr1 + " is greater than " + nbr2);
|
||||
|
||||
if(nbr1==nbr2)
|
||||
System.out.println(nbr1 + " is equal to " + nbr2);
|
||||
} catch(IOException e) { }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue