We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1ba06a commit 9c76bfcCopy full SHA for 9c76bfc
2-variables/12_cat_years.cpp
@@ -0,0 +1,14 @@
1
+// Cat Years 🐈
2
+
3
+#include <iostream>
4
5
+int main() {
6
+ int catAge;
7
8
+ std::cout << "Welcome to the Cat Years program! This only works for cats older than 3 years old.\n";
9
+ std::cout << "Enter your cat's age: ";
10
+ std::cin >> catAge;
11
12
+ int humanYears = (catAge - 2) * 4 + 24;
13
+ std::cout << "Your cat is " << humanYears << " years old in human years.";
14
+}
0 commit comments