View Code of Problem 52

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

Double click to view unformatted code.


Back to problem 52