Basics_Que_18

Home / Java Practice Question / Basics_Que_18

Basics_Que_18


Write a java program that accepts three numbers from the user and check if numbers are in "increasing" or "decreasing" order.

program : 

public class Loop {

public static String checkNum(int num1, int num2,int num3){

if(num1<num2 && num2<num3){
return "Number Entered in Increasing Order......";
} else if (num1>num2 && num2>num3){
return "Number Entered in Decreasing Order......";
}else{
return "Number Entered in Neither Increasing Nor Decreasing order...."
}
}

}