extras: add P16-P23, P25
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
23
P21.java
Normal file
23
P21.java
Normal file
@@ -0,0 +1,23 @@
|
||||
import java.util.Scanner;
|
||||
|
||||
public class P21 {
|
||||
public static void main(String[] args) {
|
||||
Scanner scanner = new Scanner(System.in);
|
||||
|
||||
System.out.print("Enter a: ");
|
||||
int a = scanner.nextInt();
|
||||
|
||||
System.out.print("Enter b: ");
|
||||
int b = scanner.nextInt();
|
||||
|
||||
System.out.print("Enter c: ");
|
||||
int c = scanner.nextInt();
|
||||
|
||||
if ( a > b && a > c)
|
||||
System.out.print("a is the greatest integer");
|
||||
else if ( b > a && b > c)
|
||||
System.out.print("b is the greatest integer");
|
||||
else
|
||||
System.out.print("c is the greatest integer");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user