Answer:
The output will be "Failure"
Here I used If-Else condition. As per if else logic if "if" part gets true then all other else parts are omitted eventhough the conditon might true.
Here the last condition "if (Marks >= 60 && Marks < 90)" satisfies condition if we give value 60 but third condition "if (Marks <= 60)" also gets true. Since
thrid condition itself gets true fourth condition will not be executed though it is true as well.
Asked In: Ramco Systems |
Alert Moderator