Ask Question
8 April, 17:05

he Animal Insurance Company:Writes a program that repeatedly prints the insurance fee to pay for a pet according to the following rules: A dog that has been neutered costs $50. A dog that has not been neutered costs $80. A cat that has been neutered costs $40. A cat that has not been neutered costs $60. A bird or reptile costs $10. Any other animal generates an error message.

+3
Answers (1)
  1. 8 April, 19:56
    0
    Program code is given below.

    Explanation:

    #include

    using namespace std; 03

    int main ()

    {

    char neutered, opselect, animal;

    const int dogcost = 80, catcost = 60, birdOrReptilecost = 0;

    cout << "What kind of animal do you have?/n";

    cout << "d for dog, c for cat, b for bird or reptile and o for others./n/n";

    cin >> animal;

    cout << "Answer the following questions/n";

    cout << "With Y for yes or N for no./n/n";

    cout << "Is your pet neutered? ";

    cin >> neutered;

    cout << "Enter a select code: ";

    cout << "/n1) A dog that has been neutered: ";

    cout << "/n2) A dog that has not been neutered: ";

    cout << "/n3) A cat that has been neutered costs: ";

    cout << "/n4) A cat that has not been neutered costs: ";

    cout << "/n5) A bird or reptile: ";

    cin >> opselect;

    switch (opselect)

    {

    case 1:

    cout << "The price for dog that has been neutered is " << dogcost - 30;

    break;

    case 2:

    cout << "The price for dog that has not been neutered is " << dogcost << endl;

    break;

    case 3:

    cout << "The price for cat that has been neutered is " << catcost - 20 << endl;

    break

    case 4:

    cout << "The price for cat that has not been neutered is " << catcost << endl;

    break;

    case 5:

    cout << "The price for bird or reptile is " << birdOrReptilecost << endl;

    break;

    return 0;

    }
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “he Animal Insurance Company:Writes a program that repeatedly prints the insurance fee to pay for a pet according to the following ...” in 📙 Engineering if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers