Convert my pseudocode

feldwoman93

New member
Joined
Jul 25, 2013
Messages
1
Programming Experience
Beginner
Declare String names (20)
Declare String name
Declare Integer i
Declare Integer j
For i = 1 To 20
Display ?Enter a name, please?
Input name
Set names(i) = name
End For
Module bubbleSort (Integer Ref array [ ], Integer arraySize)
//Sorting the array ascending using bubble sort
For (i = 20; i > = 1; I - -)
For (j = 0; j < I; j + +)
If names(j) > names (j + 1) Then
Call swap (names(j), names[j + 1])
End If
End For
End For
//Displaying the data in the array
For i = 1 to 20
Display names(i)
End For
End module
 
Back
Top