View Code of Problem 52

#include<stdio.h>
#include<string.h>
int main(){
	char str[100];
	char t;
	gets(str);
	int l=strlen(str);
	int j=l-1;
	for(int i=0;i<l/2;i++){
		t=str[j];
		str[j]=str[i];
		str[i]=t;
		j--;
	}
	puts(str);
}

Double click to view unformatted code.


Back to problem 52