#include <iostream> #include <cstdio> using namespace std; int main(){ char str[150],a[150]; cin.getline(str,150); long i; int j,t; for(i=strlen(str)-1,j=0;i>=0,j<strlen(str);j++,i--){ // for(j=0;j<strlen(str);j++) t=str[i]; a[j]=t; } for(j=0;j<strlen(str);j++){ cout<<a[j]; } return 0; } /* Main.cc: In function 'int main()': Main.cc:9:21: error: 'strlen' was not declared in this scope for(i=strlen(str)-1,j=0;i>=0,j<strlen(str);j++,i--){ ^ Main.cc:15:25: error: 'strlen' was not declared in this scope for(j=0;j<strlen(str);j++){ ^ */ |
Double click to view unformatted code.