View Code of Problem 52

#include <stdio.h>
#include <string.h>
int main()
{
	char str[100];
	int i,n,temp;
	gets(str);
	n=strlen(str);
	for (i=0;i<n/2;i++)
	{
		temp=str[n-i-1];
		str[n-i-1]=str[i];
		str[i]=temp;
	}
	puts(str);
	str[i]='\0';
	return 0;
}

Double click to view unformatted code.


Back to problem 52