Search:

Type: Posts; User: valenciajv

Search: Search took 0.11 seconds.

  1. Replies
    9
    Views
    1,801

    Re: I am doing my homework =D

    Does this make a random number between 1 and 10?
    I never exactly knew how this one works cause I would get zeros as well. Can you help?

    int num1 = (int) (System.currentTimeMillis()%10);
  2. Replies
    9
    Views
    1,801

    Re: I am doing my homework =D

    It said process completed. =D
    Thank you.
    I am not done with the whole thing yet. Time to resume my homework. =D
  3. Replies
    9
    Views
    1,801

    Re: I am doing my homework =D

    I guess that would make sense to convert into an int.

    How about this?
    String answerString = JOptionPane.showInputDialog(null,"Guess a number between 1 and 10");
    int answer =...
  4. Replies
    9
    Views
    1,801

    Re: I am doing my homework =D

    They are this
    int num1 = (int) (System.currentTimeMillis()%10);

    String answer = JOptionPane.showInputDialog(null,"Guess a number between 1 and 10");
  5. Replies
    9
    Views
    1,801

    I am doing my homework =D

    Hi I just had a quick question. I have this code

    if (answer > num1)
    JOptionPane.showMessageDialog(null,"Your answer is too high");
    else if (answer < num1)
    JOptionPane.showMessageDialog(null,...
Results 1 to 5 of 5