Answer:
76
Step-by-step explanation:
How many numbers are between 256 and 789 are divisible by 7 ?
Generalizing, we could look for a procedure that, given two integers A and B, with B>A , and a module M, tells us how many integers x, with A<=x<=B , are divisible by M.
a) let n1 be the lowest integer >=A such that n1 is divisible by M.
If n1>B , than not even n1 has the required properties and the output of the procedure is 0; otherwise, go to the next step.
n1 will be the first number of the sequence of numbers divisible by M.
b) let n2 be the highest integer <=B such that n2 is divisible by M.
Notice that it’s not possibile that n2<A , as you alway have the possibility n2=n1 .
n2 w
A simple way to think about this is by calculating the largest multiple of 7 less than 256 (let’s call it y) and the smallest multiple of 7 greater than 789 (let’s call it x). The answer is then all the multiples of 7 in between these two numbers, which can be represented by:
x−y7−1
Let’s do it:
252 is the largest number less than 256 divisible by 7. y = 252
791 is the smallest number greater than 789 that’s divisible by 7.
Thus, our answer is 113-36–1 = 76.
Note: we subtract 1 or else we would include the number on the top end of the range (in this case, 791).
Hope it helped you!!
Pls mark me the brainliest :)