View Code of Problem 114

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

Double click to view unformatted code.


Back to problem 114