What to do in otherwise case?

what code do i have to write in otherwise case: print “-1”

Hello @RASHMI2000,

Create a function:

  1. It prints the other two sides in increasing order if they exist and return true.
  2. Else it returns false.
    In the main function print -1 if returned value is false.

Hope, this would help.
Give a like, if you are satisfied.

what is the condition when triplet does not exist?

You need not check for that condition.

fun(){
logic{
implementation:
if triplets are found print and return true;
}
return false;
}

If the control is executing the statement “return false”, it itself indicates that triplets do not exists.

Hope, this would help.