>= 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,...
Type: Posts; User: DuncanS
>= 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,...
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...