Computer Science, asked by tinavij99, 11 months ago

write a program in java that takes an integer and tests whether it is divisible b2,4 and 5.(without scanner,buffer)...
(using if,if else)​

Answers

Answered by devikamj5rv
3

Answer:

divisible by 2,4 and5

Explanation:

int n=Integer.parseInt(br.readLine());

//input the no. in 'n'.

if(n%2==0&&n%4==0&&n%5==0)

System.out.println(n+"is divisisble by 2,4 and 5");

else

System.out.println(n+"is not divisible by 2,4 and 5");

Similar questions