View Code of Problem 52

#include<stdio.h>
#include<math.h>
#include<string.h>
int main() {
	char s[1000];
	char a[1000];
	int i, j = 0;
	gets(s);
	int n = strlen(s);
	for (i = n - 1; i >= 0; i--) {
		a[j] = s[i];
		j++;
	}
	a[j] = '\0';
	puts(a);
	printf("\n");
	return 0;
}

Double click to view unformatted code.


Back to problem 52