aboutsummaryrefslogtreecommitdiff
path: root/3c/4.13.3Exercises/4.13.3Execises/4.13.3Execises.cpp
diff options
context:
space:
mode:
authorJacobAKnox <[email protected]>2021-10-06 20:36:31 -0700
committerJacobAKnox <[email protected]>2021-10-06 20:36:31 -0700
commit9afdeb797d71c7299f1a2657af89dcfaa296aee3 (patch)
tree275841cf914bf82672d35b597cf61ae25cbd4dbf /3c/4.13.3Exercises/4.13.3Execises/4.13.3Execises.cpp
parentdelete old files (diff)
downloadarchived-cst116-lab2-jacobaknox-9afdeb797d71c7299f1a2657af89dcfaa296aee3.tar.xz
archived-cst116-lab2-jacobaknox-9afdeb797d71c7299f1a2657af89dcfaa296aee3.zip
3c exercises
Diffstat (limited to '3c/4.13.3Exercises/4.13.3Execises/4.13.3Execises.cpp')
-rw-r--r--3c/4.13.3Exercises/4.13.3Execises/4.13.3Execises.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/3c/4.13.3Exercises/4.13.3Execises/4.13.3Execises.cpp b/3c/4.13.3Exercises/4.13.3Execises/4.13.3Execises.cpp
new file mode 100644
index 0000000..6afbbae
--- /dev/null
+++ b/3c/4.13.3Exercises/4.13.3Execises/4.13.3Execises.cpp
@@ -0,0 +1,17 @@
+// 4.13.3Execises.cpp : This file contains the 'main' function. Program execution begins and ends there.
+//
+
+#include <iostream>
+using namespace std;
+
+int main()
+{
+ const int DAYS_PER_YEAR = 365;
+ int ageDays, ageYears;
+ cout << "How old are you in full years: ";
+ cin >> ageYears;
+
+ ageDays = ageYears * DAYS_PER_YEAR;
+ cout << "You are " << ageDays << " days old.";
+ return 0;
+}