Numbers whose sum of digits is divisible by 3 represent numbers divisible by 3.
Write a program to verify this famous statement.
Input a 5-digit integer n from the keyboard.
Find the sum of the digits. Call it sum.
Verify that either (a) both n and sum are divisible by 3 or (b) both are indivisible by 3.
Your output is:
Given number n = …
Sum of the digits sum = …
Prints one of the following three statements:
(a) Both n and sum are divisible by 3
(b) Both n and sum are indivisible by 3
(c) The famous statement is wrong
I need help with this in java.