Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

EEL 4 8 3 4 You are tasked with helping a friend with managing a pet store inventory and sales. Create a program to enter

EEL 4834 You are tasked with helping a friend with managing a pet store
inventory and sales. Create a program to enter and store an
initial number of cats and dogs in addition to the cost price of
each. The output of the program should include the number of
cats, price per cat, and price for all cats, and the same goes for
dogs. Finally, the output should include the total cost of all pets
(
cats and dogs
)
in the store. The following instructions should
be helpful:
-
Create an integer variable named cat
-
Create an integer variable named dog.
-
Create a float variable named catp.
-
Create a float variable named dogp.
-
Create a float variable named ctotal, dtotal, ptotal.
-
Prompt the user to enter the number of cats and store it in
the variable cat.
-
Prompt the user to enter the number of dogs and store it
in the variable dog.
-
Prompt the user to enter the price per cat and store it in
the variable catp.
-
Prompt the user to enter the price per dog and store it in
the variable dogp.
-
Calculate the price for all the cats in the store and store it
in ctotal.
-
Calculate the price for all the dogs in the store and store it
in dtotal.
-
Calculate the total cost of all the pets in the store and
store it in ptotal.
-
Output the store information as in the screen shot below.
-
The output should be formatted neatly as shown in the
example below, make sure to test with smaller and then
larger number to ensure that the alignment is proper
(
5
or
5
0
0
0
or each pet, price of
2
.
5
or
5
0
0
0
0
per pet
)
.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visualizing Health And Healthcare Data Creating Clear And Compelling Visualizations To See How Youre Doing

Authors: Katherine Rowell ,Lindsay Betzendahl ,Cambria Brown

1st Edition

1119680883, 978-1119680888

More Books

Students also viewed these Databases questions

Question

Why are so many soils yellow, brown, or red in color?

Answered: 1 week ago

Question

love of humour, often as a device to lighten the occasion;

Answered: 1 week ago

Question

orderliness, patience and seeing a task through;

Answered: 1 week ago

Question

well defined status and roles (class distinctions);

Answered: 1 week ago