Question:See the following pseudocode for sorting three numbers:

IF A < B THEN
   move A to TEMP
   move B to A
   move TEMP to B
ELSE
   (null)
END IF

IF A<C THEN
   move A to TEMP
   move C to A
   move TEMP to C
ELSE
   (null)
END IF

IF B<C THEN
   move B to TEMP
   move B to C
   move TEMP to C
ELSE
   (null)
END IF

IF B<C THEN
   move  A to TEMP
   move C to
   move TEMP to B
ELSE

   (null)

END IF


Is the above pseudocode is correct?


 

A True 

B False 

+ Answer
+ Report
Total Preview: 846

Copyright © 2024. Powered by Intellect Software Ltd