diff options
| author | rPatrickWarner <[email protected]> | 2024-01-22 20:00:19 -0800 |
|---|---|---|
| committer | rPatrickWarner <[email protected]> | 2024-01-22 20:00:19 -0800 |
| commit | 665b237b7c24fe3d09473f1f6bcc0e7c5adf50a9 (patch) | |
| tree | ef03c9c8af7c1a64e183c2b55380a8844276b9aa | |
| parent | init and some extra (diff) | |
| download | in-class-exercise-6-reecepwarner-665b237b7c24fe3d09473f1f6bcc0e7c5adf50a9.tar.xz in-class-exercise-6-reecepwarner-665b237b7c24fe3d09473f1f6bcc0e7c5adf50a9.zip | |
| -rw-r--r-- | inclassexercise6reecew/inclassexercise6reecew/source.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/inclassexercise6reecew/inclassexercise6reecew/source.cpp b/inclassexercise6reecew/inclassexercise6reecew/source.cpp index 3391e8f..9329dac 100644 --- a/inclassexercise6reecew/inclassexercise6reecew/source.cpp +++ b/inclassexercise6reecew/inclassexercise6reecew/source.cpp @@ -11,9 +11,20 @@ using std::cin; using std::endl; + +void thisIsRecursive(int a) +{ + cout << "This number is now" << a << endl; + if (a == 0) return; + + thisIsRecursive(--a); +} + int main() { + thisIsRecursive(10); + cout << math() << endl; cout << math(2) << endl; cout << math(3, 4) << endl; |