#include<iostream> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <cmath> #include <algorithm> using namespace std; #pragma warning(disable:4996) int main() { char s[100]; gets_s(s); int n = strlen(s); for (int i = 0; i < n; i++) { printf("%c", s[n - i - 1]); } return 0; } /* Main.cc:8:0: warning: ignoring #pragma warning [-Wunknown-pragmas] #pragma warning(disable:4996) ^ Main.cc: In function 'int main()': Main.cc:13:10: error: 'gets_s' was not declared in this scope gets_s(s); ^ */ |
Double click to view unformatted code.