WAP to input 2 nos. and chek their divisibility by 6
JAVA Program
Please send full program
Answers
Answered by
0
Input::
import java.util.Scanner;
public class Divisibility
{
public static void main(String args[])
{
int a,b;
Scanner s = new Scanner(System.in);
System.out.print("Enter the two numbers:");
a = s.nextInt();
b = s.nextInt();
if(a% 6 == 0 && b%6 == 0)
{
System.out.println(n+" is divisible by 6");
}
else
{
System.out.println(n+" is not divisible by 6");
}
}
}
Similar questions