Question: a. Write a C++ program to create a structure called Pet Shop with the variables Pet Name, Pet Colour and Pet Price. You have to
a. Write a C++ program to create a structure called Pet Shop with the variables Pet Name, Pet Colour and Pet Price. You have to create two structure variables and enter the Pet Name, Pet Colour and Pet Price for two. Finally, you have to calculate the total pet price. Display the details as shown below. Pet Name Price Cat Pet color Black Green 12.250 Parrot 18.825 b. Using file handling, write a C++ program to create a file called 'Petshop.text' and write the following details into the file in the format shown below. Pet Name Price Cat Pet color Black Green 12.250 Parrot 18.825 **** *******
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
