# Idiot/Noob HelpLine :) <----------HERE

• August 8th, 2013, 03:15 PM
percy121
Idiot/Noob HelpLine :) <----------HERE
Hey guys im rather new to programming and I have a newbie question for you:

I am making a program as a project, that's purpose is to tell whether a number is divisable by 1,2,3,4,5,6,7,8,9 and/or 10.
So far I have the graphic parts done like JOptionPanes and SystemOuts but I am stuck on the Calculation Parts. I need the program to separate the digits in a potentially 200 digit long number and "read" them. Here is an Example of one of the Equations i need to do:

To tell whether a number is divisable by 11 you must take the even number places (reading left to right: odd,even,odd,etc.), add them up, then add all the odd places, then take the sums, and subtract the evens from the odds.

So... Fairly specifically... how would I do this? (Please include all var's and associated scanners: Remember Im new at this)

Thanks,
JB ;)
• August 9th, 2013, 03:15 AM
LukeCodeBaker
Re: Idiot/Noob HelpLine :) <----------HERE
All you have to do is to use modulo operator. If you don't know what modulo operator is, see wiki http://en.wikipedia.org/wiki/Modulo_operation or simple example here: http://www.cprogramming.com/tutorial/modulus.html.
• August 9th, 2013, 02:46 PM
percy121
Re: Idiot/Noob HelpLine :) <----------HERE
Hey Luke aor anybody else... If I could have a java example of the modulo operator that would be great! Thanks!