Ask your own question, for FREE!
Computer Science 14 Online
OpenStudy (malak):

1. Write a program in C++ that calculates and prints the Total cost of a pet depending on the cost without insurance read from the user and the insurance fee for each pet according to the following rules: - A dog that is male costs $50. - A dog that is female costs $80. - A cat that is male costs $40. - A cat that is female costs $60. - A bird or reptile costs nothing. - Any other animal generates an error message. "Sorry!!.. You have typed a wrong animal!!" The program should prompt the user for the appropriate information, using a code to determine the kind of animal (i.e. D

OpenStudy (espex):

This looks like it could be easily done with some cout/cin commands and a switch/case or if/else for each of the conditions.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!