We define an integer x as a good integer if x is divisible by7 but not divisible
Fantastic news! We've Found the answer you've been seeking!
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 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
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date: