Computer Science, asked by koyeldas30, 7 months ago

write a program to check whether the number is divisible by 3 but not divisible by 7 in Q Basic​

Answers

Answered by 10ayushranjan
1

Answer:

To check if a number is evenly divisible by 7: Take the last digit of the number, double it Then subtract the result from the rest of the number If the resulting number is evenly divisible by 7, so is the original number.

A number is divisible by 3 if the sum of its digits is divisible by 3. 375, for instance, is divisible by 3 since sum of its digits (3+7+5) is 15. And 15 is divisible by 3. 1+2=3 and 3 is divisible by 3.

Similar questions