InterviewSolution
Saved Bookmarks
| 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» ong>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"); } } } |
|