Idiot/Noob HelpLine :) <----------HERE
 CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

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

1. Junior Member
Join Date
Aug 2013
Posts
2

## 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

2. Junior Member
Join Date
Aug 2013
Posts
8

## 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.

3. Junior Member
Join Date
Aug 2013
Posts
2

## 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!
Last edited by percy121; August 12th, 2013 at 12:39 PM.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)