Monday, November 11, 2013

C++ Program That Prints the Insurance Fee to Pay for a Pet

Write a program that prints the insurance fee to pay for a pet according to the following rules:
1)A dog that has been neutered costs $40.
2)A dog that has not been neutered costs $50.
3)A cat that has been neutered costs $450.
4)A cat that has not been neutered costs $65.
5)A bird or reptile costs nothing.
6)Any other animal generates an error message.
The program should prompt the user for the appropriate information, using a code to determine the kind of animal (i.e. D or d represents a dog, C or c represents a cat, B or b represents a bird, R or r represents a reptile, and anything else represents some other kind of animal).
After printing the insurance fee, the program should ask the user if (s)he wants to insure another animal.

No comments:

Post a Comment

Please comment, if you like the post, you find any mistake or if you have any query.