Winman Software India interview question

Solve the pseudo code of some problems