Back To Java Flow of Control Index
//program to input two numbers a and b and check whether a is divisible by b or not using if-else statement public class adivisibleb { public static void main(String[] args) { int a,b; a=10; b=5; if(a%b==0) { System.out.println("a is divisible by b"); } else { System.out.println("a is not divisible by b"); } } }