run it type hello, press enter then type end in a c ompiler
#include <stdio.h>
#include "strlib.h"
#include "simpio.h"
#include "genlib.h"
#include "string.h"
#define size 50
void reverse(char rev[]);
int main()
{
char rev[size], i;
printf("Please enter a sentence and end the sentence with a enter than end \n");
reverse(rev);
system("pause");
}
void reverse(char rev[])
{
string ch;
int i;
if(StringCompare((ch = GetLine()), "end") != 0)
{
for(i=1; i<StringLength(ch); i++)
{
rev[i] = IthChar(ch, i);
}
reverse(rev);
}
else;
for(i=48; i<size; i--)
{
if(rev[i] == 'end');
else
{
printf("%c",rev[i]);
}
}
}