1.

Write a program to accept a Number & check whether the number is divisible by 5 as well by 7 or not .The program will display the word “found –easily “else print “not Found- Try again “in java​

Answer»

Answer:

import java.util.*;

CLASS ABC

{

Public static void main()

{

int a ;

System.out.println("Enter the Number to be checked ");

a= in.nextInt();

if (a%5==0||a%7==0)

{

System.out.println("FOUND EASILY");

}

else

{

System.out.println("Not Found-try again");

}

}

}



Discussion

No Comment Found