Search:

Type: Posts; User: DuncanS

Search: Search took 0.10 seconds.

  1. Thread: Java problem

    by DuncanS
    Replies
    7
    Views
    948

    Re: Java problem

    >= and <= are used when you need an inclusive set. if (num2>=5 && num2<=10) will return true for the set { 5, 6, 7, 8, 9, 10 }, whereas if (num2>5 && num2<10) will return true for the set { 6, 7, 8,...
  2. Thread: Java problem

    by DuncanS
    Replies
    7
    Views
    948

    Re: Java problem

    The issue is here:

    if (num2>15 && num3>15) {
    System.out.println ("Two larger");
    }

    With your inputs you're asking if (15>15 && 34>15), but 15 is not greater than 15, it is equal. If you need...
Results 1 to 2 of 2