Conteúdo do Curso
C# Basics
C# Basics
Practicing Return Values
Here operate
is a method which is supposed to return true
if a + b
equals c
. Fill in the blank to make the method behave accordingly.
main
- We can write expressions directly in the return statement.
- For-example, writing
return a + b
; is valid as it will first evaluatea + b
and in-turn return the resultant value. Similarly, we can also directly write boolean expressions in the return values, as boolean expressions are expressions after all. Hence, writingreturn a > b
; is also valid. Using this information, think of a way how you can write a boolean expression that returnstrue
if the sum ofa
andb
is greater thanc
.
main
Tudo estava claro?