diff options
| author | Asahel <[email protected]> | 2024-02-03 12:04:14 -0800 |
|---|---|---|
| committer | Asahel <[email protected]> | 2024-02-03 12:04:14 -0800 |
| commit | d0f5ad9a5db08f3831fdb77b9e223855db3431b9 (patch) | |
| tree | 7b95f14e0c685583f97f37755a8e6a5dc99f88d4 | |
| parent | Added source file. (diff) | |
| download | homework-4-asahellt-d0f5ad9a5db08f3831fdb77b9e223855db3431b9.tar.xz homework-4-asahellt-d0f5ad9a5db08f3831fdb77b9e223855db3431b9.zip | |
Implemented a forloop solution.
| -rw-r--r-- | Homework 4/program.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Homework 4/program.cpp b/Homework 4/program.cpp index b3f854e..c851742 100644 --- a/Homework 4/program.cpp +++ b/Homework 4/program.cpp @@ -5,3 +5,38 @@ #include <iostream> +using std::cout; +using std::endl; +using std::cin; + +void Print() { + + for (int i = 0; i <= 100; i++) { + cout << i << " "; + } +} + int main() { + + cout << "A. Print(100)" << endl; + cout << "B. Input Personal Information" << endl; + cout << "C. Print Fibonacci" << endl; + cout << "D. Exit" << endl; + + char input = 'A'; + + switch (input) { + case 'A': + Print(); + break; + } + + int month; + int day; + int year; + + cout << "Enter your date of birth"; + cin >> month >> day >> year; + + + return 0; + }
\ No newline at end of file |