Question: We define an integer x as a good integer if x is divisible by7 but not divisible by 5. For example, 14 and 21 are
We define an integer x as a “good integer" if x is divisible by7 but not divisible by 5. For example, 14 and 21 are good integers,but 5 and 35 are not. Given an integer n, please find the minimum“good integer” m such that m>=n.
Input
Each test case has only one line containing an integer n(1<=n<=1000).
Output
For each test case output one line containing one integer,indicating the value of m.
Sample Input
1
7
20
30
Sample Output
7
7
21
42
Programme a code in java for this
Step by Step Solution
3.47 Rating (154 Votes )
There are 3 Steps involved in it
GoodIntegerjava Java program that reads an integer and displays the mi... View full answer
Get step-by-step solutions from verified subject matter experts
