Sort the given array elements using the ff. pseudocode:
Array Elements:
Arr1[1] Reymar
Arr1[2] Dennis
Arr1[3] Volary
Arr1[4] Janine
Arr1[5] Mark
Sort_Arr(Arr1,N)
{
Set ctr1 to 1
While (ctr1%26lt;=N-1)
{
Set ctr2 to ctr1 + 1
While (ctr2%26lt;=N)
{
If (Arr1 [ctr1] %26gt; Arr1 [ctr2]) then
{
Set Temp to Arr1 [ctr1]
Set Arr1 [ctr1] to Arr1 [ctr2]
Set Arr1 [ctr2] to Temp
}
Increment ctr2
}
Increment ctr1
}
}
***Please do it in C language source codes, thank you.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment