Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<string>
- using namespace std;
- int dao(char s[30])
- {
- if (strlen(s) == 0) return 0;
- else
- {
- cout << s[strlen(s) - 1];
- s[strlen(s) - 1] = '\0';
- }
- dao(s);
- }
- void main()
- {
- char s[30];
- cout << "Nhap chuoi:";
- fflush(stdin);
- cin.getline(s, 30);
- cout << "Chuoi dao nguoc la:";
- dao(s);
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement