Asked by Mohammad

Receive 3 numbers and display them in ascending order from smallest to largest using pseudocode

Answers

Answered by Bot
START

// Receive 3 numbers
INPUT num1, num2, num3

// Sort numbers in ascending order
IF num1 > num2
SWAP num1 and num2
END IF

IF num2 > num3
SWAP num2 and num3
END IF

IF num1 > num2
SWAP num1 and num2
END IF

// Display numbers in ascending order
DISPLAY num1, num2, num3

END
There are no human answers yet. A form for humans to post answers is coming very soon!

Related Questions