Search:

Type: Posts; User: MrLowBot

Search: Search took 0.08 seconds.

  1. Replies
    22
    Views
    875

    Re: Between 100 and 200.

    public class Test1 {
    public static void main(String[] args) {

    for (int i = 104; i <= 196; i++) {
    if ((i % 5 == 0) && (i % 4 == 0)) {
    System.out.print("");
    } else if ((i % 4 == 0)...
  2. Replies
    22
    Views
    875

    Re: Between 100 and 200.

    So what i get is:


    i = 0 mod 4 = 0
    i = 1 mod 4 = 1
    i = 2 mod 4 = 2
    i = 3 mod 4 = 3
    i = 4 mod 4 = 0
    i = 5 mod 4 = 1
    i = 6 mod 4 = 2
  3. Replies
    22
    Views
    875

    Re: Between 100 and 200.

    No i do not.

    And no it isn't in the spirit of the assignment :/

    So i feel rather stuck atm.
  4. Replies
    22
    Views
    875

    Re: Between 100 and 200.

    What i think it should do.
    1. The program should know that it only can choose from 100 to 200.
    2. It should be able to print out every value from 100 to 200 (which it can if we begin from scratch)....
  5. Replies
    22
    Views
    875

    Re: Between 100 and 200.

    Okay so i followed both of your steps.
    I can get the numbers that i am searching for!
    However before i did that i took, ex, 104 / 4 = 26.
    And then the highest which would be 195 / 5 = 39.
    I...
  6. Replies
    22
    Views
    875

    Re: Between 100 and 200.

    I meant "number".
    I know that it doesn't change. Trying to figure it out with modulus rn.
    The assignment was that i needed numbers that go from 100 to 200 or 200 to 100 that devide by 4 or 5 but...
  7. Replies
    22
    Views
    875

    Re: Between 100 and 200.

    public static void main(String[] args) {

    int number = 0;

    for (int i = 200; i > 100; i--) {
    i = i / 4 ^ 5;
    i = number;
    }

    System.out.println(number);
  8. Replies
    22
    Views
    875

    Re: Between 100 and 200.

    Nothing.. i am stuck and i don't know what to do xD
  9. Replies
    22
    Views
    875

    Between 100 and 200.

    So i wanted to write a code that, when it starts, prints out numbers between 100 and 200 that can be devided between 4 or 5 but not both!
    Really hard to figure out how i should go about doing so.
    ...
Results 1 to 9 of 9