#include<stdio.h> #include<string> 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"); } } /* Main.c:2:9: fatal error: string: No such file or directory #include<string> ^~~~~~~~ compilation terminated. */ |
Double click to view unformatted code.