Computer Science, asked by rishika006, 3 months ago

write a algorithm to check if a number is divisible by 3 or not​

Answers

Answered by Anonymous
3

Answer:

ANSWER

a+b+c=0

a=−b−c ..........(1)

(a+b+c)

2

=0

a

2

+b

2

+c

2

+2(ab+bc+ca)=0

K(a

2

−bc)+2(ab+bc+ca)=0

2(ab+bc+ca)=−K(a(−b−c)−bc)

⟹2(ab+bc+ca)=K(ab+bc+ca)

⟹K=2

Answered by skalamkar123
2

Answer:

Add up all the numbers and check if that sum is divisible by 3 or not. For example 234. 2+3+4=9. Since 9 is divisive by 3, 234 is divisible by 3.

Similar questions