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