Computer Science, asked by tirkeyk387, 6 months ago

Write a Java program to find the greatest and smallest between two number using mathematical library functions (plz in order) and (output also plzzzz)

Answers

Answered by nishantkumar1415
0

Explanation:

import java.util Scanner

public class comparison{

public static void main(){

Scanner sc = newScanner(system.in)

int x = sc.nextInt()

int y = sc.nextInt()

if (x>y) {System.out.println(x+" is the greater number";

System.out.println(y+" is the smaller number";

}

else{System.out.println(y+" is the greater number";

System.out.println(x+" is the smaller number";}

}

}

Similar questions