Search:

Type: Posts; User: Henry518

Search: Search took 0.12 seconds.

  1. Replies
    6
    Views
    1,431

    Re: Simple Java Program - hasTeen [HELP]

    Thanks for the suggestion, i'll try to keep that in mind. ^^
  2. Replies
    6
    Views
    1,431

    Re: Simple Java Program - hasTeen [HELP]

    Alright, true... I found the problem:

    public static boolean hasTeen(int a, int b, int c)
    {
    if ( a >= 13 && a<= 19 || b >= 11 && b<= 19 || c >= 13 || c<= 19)
    {
    return true;...
  3. Replies
    6
    Views
    1,431

    Re: Simple Java Program - hasTeen [HELP]

    You put "return false" in the wrong position, where the "return true" should be. Try inverting them like this:


    public static boolean hasTeen(int a, int b, int c)
    {
    if ( a >= 13 && a<=...
Results 1 to 3 of 3