Question
Write a complete C++ program that asks the user to enter their age and the number of pets that they have at home. A
Write a complete C++ program that asks the user to enter their age and the number of pets that they have at home. A legal age must be between 1 and 100 (inclusive). If the user enters an illegal age the program should print I don't believe you! Otherwise if the number of pets is divisible by the age (without a remainder) the program should print Here is a sample to show how the program runs. Enter the your age and number of pets: 20 200 That is a lot of pets. That is a lot of pets.
Step by Step Solution
3.49 Rating (149 Votes )
There are 3 Steps involved in it
Step: 1
Based on the given requirements you want a C program that prompts the user for their age and the num...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get StartedRecommended Textbook for
Java An Introduction To Problem Solving And Programming
Authors: Walter Savitch
8th Edition
0134462033, 978-0134462035
Students also viewed these Programming questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App