Created
October 31, 2025 12:15
-
-
Save juanfal/dc57f7a23528927a454d61345e97e570 to your computer and use it in GitHub Desktop.
recursive reading no invert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 01.recread_b.cpp | |
| // juanfc 2025-10-31 | |
| // https://gist.github.com/juanfal/dc57f7a23528927a454d61345e97e570 | |
| #include <iostream> | |
| using namespace std; | |
| int main() | |
| { | |
| void recReadPrint(); | |
| recReadPrint(); cout << endl; | |
| return 0; | |
| } | |
| void recReadPrint() | |
| { | |
| char c; | |
| if (cin.get(c) and c != '\n') { | |
| cout << c; | |
| recReadPrint(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment