View Code of Problem 52

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

Double click to view unformatted code.


Back to problem 52