Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C + + coding please Define a structure named. An imal with the following four fields: species ( string ) : Represents the species of
C coding please
Define a structure named. An imal with the following four fields:
species string: Represents the species of the animal.
age int: Represents the age of the animal.
weight double: Represents the weight of the animal.
ispet bool: Represents whether the animal can be a pet true or not false
Within the main function declare an Animal variable called myAnimal and prompt the user for input values for each of the fields as follows:
What is the species of the animal?
What is the age of the animal?
What is the weight of the animal?
Can this animal be a pet for yes, for no
Within main, print out all of the information about the animal with the following format:
Animal Details:
Species:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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 Started