Computer Science, asked by kayamtejaswi2004, 3 months ago

write a c program that will print the natural numbers which are evenly divisible by 13

c- program​

Answers

Answered by kaushiknitish81
2

Answer:

Given a large number, the task is to check if number is divisible by 13 or not.

Examples :

Input : 637

Output : 637 is divisible by 13.

Input : 920

Output : 920 is not divisible by 13.

Input : 83959092724

Output : 83959092724 is divisible by 13

A number is divisible by 13 if and if alternating sum (alternatively adding and subtracting) of blocks of three from right to left is divisible by 13. For example 2911285 is divisible by 13 because alternating sum of blocks of size 3 is 2 – 911 + 285 = -650 which is divisible by 13.

A number is divisible by 13 if and only if the number obtained by adding last digit multiplied by 4 to rest is also divisible by 13.

For example consider 2353. Applying above rule, we get 235 + 3*4 = 247. Again we apply rule and get, 24 + 7*4 = 52. Since 52 is divisible by 13, given number is divisible by 13.

Answered by bed1921090pavi
0

Answer:

sala madhrachood kuta beyhanchod

Similar questions