Computer Science, asked by koreja79313pobeda, 9 months ago

Count the divisible by 7 in the interval from a to b

Answers

Answered by madhavan07
1

Answer:

As you have not specified the programming language to be used, I am giving the algorithm. You can implement it in any programming language.

In the given interval,

Check if the number % 7 is equal to zero. If so count it. Else go to the next number.

Explanation:

%(Modulus ) returns the remainder after dividing by 7. If the remainder is zero it means the number is divisible by 7

Similar questions