program executed successfully for 4 inputs