# BruceForce Method and Modulus HELP!

• March 12th, 2013, 09:26 PM
JAVAHELPP
BruceForce Method and Modulus HELP!
I was wondering how to take the modulus of every number from 11 through 20 getting a successful run of modulus values of zero for a particular number using a while loop. Thank you.
• March 12th, 2013, 10:14 PM
curmudgeon
Re: BruceForce Method and Modulus HELP!
Yes this can be done (if I'm understanding you correctly). Why not give it a try and see what you get? Or if you've already done this, what is not working for you? What is wrong with your code?
• March 13th, 2013, 12:38 AM
JAVAHELPP
Re: BruceForce Method and Modulus HELP!
I just need help getting started sir. Im not that familiar with while loops. Like i know how to do it individually doing one by one. But a while loop is the way to go.
Code :

```int i = number;       int j = 11;       int k = i % j; System.out.println(number + "%" + j + " is " + k);```

Result:
Code :

`232792560%11 is 0`

If you can get it going on the right path. I have to finish this before i go to bed. So anything would help! thanks

--- Update ---

I have to prove that taking the modulus of 232792560 from numbers 11-20 results in getting a zero using a while loop.

--- Update ---

So far but its wrong:
Code :

```    int start = 11; int end_value = 20;     while (start <= end_value) start++;   System.out.println(number % start);```

Result:
Code :

```  0```

I need help!
• March 13th, 2013, 03:38 AM
Tamilarasi
Re: BruceForce Method and Modulus HELP!
your Result 232792560%11 is 0 is correct.

What you exactly want. and What is wrong with you code?
can you explain clearly?