In C write a simple invoice generating program for a pet store as follows: 1- Ask the user for the tax rate and store it in a float variable. 2- Ask the user for the number of cats being purchased and store the value in an integer variable. 3- Ask the user for the price of one cat and store it in a float variable. 4- Ask the user for the number of dogs being purchased and store the value in an integer variable. 5- Ask the user for the price of one dog and store it in a float variable. 6- Calculate and store the total price of cats sold in a variable of type double. 7- Calculate and store the total price of dogs sold in a variable of type double. 8- You can only create the 7 mentioned variables. No more variables could be created.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section: Chapter Questions
Problem 9PP: (Data processing) Your professor has asked you to write a C++ program that determines grades at the...
icon
Related questions
icon
Concept explainers
Question

In C write a simple invoice generating program for a pet store as follows:
1- Ask the user for the tax rate and store it in a float variable.
2- Ask the user for the number of cats being purchased and store the value in an integer variable.
3- Ask the user for the price of one cat and store it in a float variable.
4- Ask the user for the number of dogs being purchased and store the value in an integer variable.
5- Ask the user for the price of one dog and store it in a float variable.
6- Calculate and store the total price of cats sold in a variable of type double.
7- Calculate and store the total price of dogs sold in a variable of type double.
8- You can only create the 7 mentioned variables. No more variables could be created.

Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Operators
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning