-3

I'm having problems with my boolean code, can anyone help me?

public bool EhAprovado()
{  
    if (_mediafinal > 7 && _quantidadefaltas < 15)
    {
        return true;
    }   
}
Gilad Green
  • 36,708
  • 7
  • 61
  • 95
  • 2
    Hello and welcome to SO. This is an English website. Please edit your question to English. Also have a look at [How To Ask](https://stackoverflow.com/help/how-to-ask) and [Take The Tour](https://stackoverflow.com/tour) to see how to post proper questions. In its current state this question is most likely to get downvoted and closed. – Gilad Green Sep 30 '18 at 13:58
  • I'm voting to close this question as off-topic because it is not written in English. – TaW Sep 30 '18 at 14:03
  • 1
    Good. Now that it is in English please follow the links of How To Ask so to correct this question and make it clear for what you are asking. (Please also give a proper title) Also if you get any compilation errors - have you googled? What have you found? – Gilad Green Sep 30 '18 at 14:06

1 Answers1

1

all return method need to return thing so If you create bool method need to return result for else Like this :

public bool EhAprovado()
{  
    if (_mediafinal > 7 && _quantidadefaltas < 15)
   return true;
   else
   return false;
}

I hope it help you

  • 1
    Though is could solve the question it is advised to wait until question is clarified and is proper before answering (and especially as this question is most likely a duplicate) – Gilad Green Sep 30 '18 at 14:11
  • oh i don't know sorry –  Sep 30 '18 at 14:13