View Code of Problem 114

#include<stdio.h>
int main()
{
    char ch[100];
    int i,t,j;
    for(i=0;i<100;i++)
    {
        ch[i]=getchar();
        if(ch[i]==' '&&ch[i]=='\n')
        {
            t=i;
            for(j=t;j>=0;j--)
            {
                printf("%c",ch[j]);
            }
        }
        if(ch[i]=='\n')
        {
            break;
        }
    }
   return 0;
}

Double click to view unformatted code.


Back to problem 114