aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsahel <[email protected]>2024-02-03 12:04:14 -0800
committerAsahel <[email protected]>2024-02-03 12:04:14 -0800
commitd0f5ad9a5db08f3831fdb77b9e223855db3431b9 (patch)
tree7b95f14e0c685583f97f37755a8e6a5dc99f88d4
parentAdded source file. (diff)
downloadhomework-4-asahellt-d0f5ad9a5db08f3831fdb77b9e223855db3431b9.tar.xz
homework-4-asahellt-d0f5ad9a5db08f3831fdb77b9e223855db3431b9.zip
Implemented a forloop solution.
-rw-r--r--Homework 4/program.cpp35
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