diff options
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.cpp | 17 |
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; +} |