if N is divided by 7 the remainder is 4 and if same number N is divided by 8 the remainder is 2. what is the value of N? Ans: N divided by 7 gives remainder 4. So N can be written as 7*m + 4 for some integer m. N divided by 8 gives remainder 2. So N can be written as 8*n + 2 for some integer n. Equating the 2 expressions for N 7*m + 4 = 8*n + 2 7*m + 2 = 8*n Need to find which integer values of m and n satisfy the above equation. Since it is only 1 equation with 2 unknown variables m and n, we can do it only by trial and error. Try different values for m (1,2,3..) and see if we get an integer value for n. We see that one possible solution is m = 2, n = 2 7*2 + 2 = 8*2 So the number N is 7*m + 4 = 18. Check: 18 div by 7 gives remainder 4, 18 div by 8 gives remainder 2 :) There are other solutions too - e.g. 74 also gives 4 as remainder when divided by 7 and a remainder of 2 when divided by 8. But 18 is the smallest such number. :)