0
What is the syntax for - To find smaller between two numbers.
In java bluej
2 Respostas
+ 6
Without any functions:
if(num1 < num2) {
System.out.println(num1)
}
else {
System.out.println(num2)
}
+ 2
Use Math.min function.... Example :
int num1=5;
int num2=10;
System.out.print(Math.min(num1,num2));
//Outputs 5