Question: Lemming Objectives: After completing this lab project, the student will be able to write C++ pro grams using if-else statements and nested iI-else statements. Step

 Lemming Objectives: After completing this lab project, the student will beable to write C++ pro grams using if-else statements and nested iI-else

Lemming Objectives: After completing this lab project, the student will be able to write C++ pro grams using if-else statements and nested iI-else statements. Step 1: In your CH DE, create a new project named Lab 6 or something similar. Add anew source code. file named lnbdrpp to the project. The, copy the code below to your operating system Ch}? board and then paste the code into the labtpp file. N This program determines the Fee tor a (at or dog pet tag. It makes use at // nested iF/else statements. #intlude using namespace std; int main() { string pet; 1'] Either "cat" on "dog" than spayed; H 'y' if the pet has been spayedeutered, otherwise 'n' // Ask the user to enter the type at pet (as a String) and then read the // input storing it in variable 'pet'. cout > pet; // Ask the user if the pet has been spayed or neutered and stone the input in // variable 'Spayed'. cout spayed; // Now we will determine the Fee for the pet's tag based on this table: H II Type mc Pet Spayed Tag Fee H nnnnnnnnnnnnnnnnnnnnnnnn 1/ Cat y $ 4.66 H Cat n $ 8.68 If Dog y $ 6.66 I] Dog n $12.66 if (pet == "tet") { if (spayed :: 'y') (out

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!