Skip to content

Commit

Permalink
Add .cpp extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonny Li committed Mar 26, 2019
1 parent dde8df9 commit af18711
Showing 1 changed file with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
#include <iostream>

int main() {
//Allow user to enter dog's name

// Allow user to enter dog's name
std::string dog_name;
std::cout << "Enter your dog's name: ";
std::cin >> dog_name;
//Allow user to enter dog's age with decimal

// Allow user to enter dog's age with decimal
double dog_age;
std::cout << "Enter dog's Age: ";
std::cout << "Enter your dog's age: ";
std::cin >> dog_age;


double early_years, later_years, human_years;
//first two years

// First two years
early_years = 21;

//accounts for later years
// Accounts for later years
later_years = (dog_age - 2 ) * 4;

//my logic for puppy math
if (dog_age < 2){
// My logic for puppy math
if (dog_age < 2) {
early_years = (early_years / 2) * dog_age;
later_years = 0;
}

human_years = later_years + early_years;

std::cout << "\nMy name is " << dog_name << "! Ruff ruff, I am " << human_years << " years old in human years.\n\n Bow wow wow, yippie yo.\n";


std::cout << "\nMy name is " << dog_name << "! Ruff ruff, I am " << human_years << " years old in human years.\n";
std::cout << "Bow wow wow yippie yo yippie yay\n";

}

0 comments on commit af18711

Please sign in to comment.