View Code of Problem 114

#include "stdio.h"
int main()
{
	char a[1000][50];
	int i=0,j=0,k,flag=0;
	while(scanf("%s",&a[i])!=EOF)
	{
		
	 	  for(k=0;a[i][k]!='\0';k++);			
		  for(j=k-1;j>=0;j--)
		  {
			printf("%c",a[i][j]);
			if(j==0)
			printf(" "); 			
		  }	
		  i++; 
		 
	}
	printf("\n");
	return 0;
}

Double click to view unformatted code.


Back to problem 114