Thursday, July 30, 2009

Please help me simulate this code in C source code?

simulate the string="COMPUTER" using the given pseudocode below:





Reverse (S)


{


Set N to the length of string S


If (N = 1) then


{


RETURN (S)


}


Else


{


Decrement N


RETURN (Reverse(SUBSTRING(S,2N)) || SUBSTRING(S,1,1)


}


}





***Please do this in a complete running source code in C language, thank you.

Please help me simulate this code in C source code?
Do your own homework.


No comments:

Post a Comment