View Code of Problem 52

#include<stdio.h>
#include<string.h>

int main()
{
	char str[105];
	int len;
	char tmp;
	
	gets(str);
	len = strlen(str);
	for(int i = 0; i < len/2; i++)
	{
		tmp = str[i];
		str[i] = str[len-i-1];
		str[len-i-1] = tmp;
	}
	puts(str);
	return 0;
}

Double click to view unformatted code.


Back to problem 52