SET A Develop a self-service laundry calculator that reads laundry weight and drying time as inputs and calculate the total cost for the laundry service according to Table 1. Assume that the maximum laundry weight is 25kg. Repeat the same task using repetition structure until user enter 'n' for no. At the end of the program produce total weight and total cost for the usage. Table 1 Washer Dryer Cold (RM) Weight (kg) Time Price (RM) <=9 4.50 Every <= 14 6.00 1 minute 0.20 <=25 10.00 Use if...else statements or switch statements and loop where it is appropriate and create a program with the following output (The numbers in bold/underline are user's input): The sample output should be as follows: **********LAUNDRY CALCULATOR******** Please enter laundry weight (kg): 7 Please select drying time (min): 15 Price (RM): 7.50 Do you want to continue? y Please enter laundry weight (kg): 31 Please select drying time (min): 20 INVALID INPUT!! Do you want to continue? X Please enter laundry weight (kg): 24 Please select drying time (min): 35 Price (RM): 17.00 Do you want to continue? n Summary: Total weight (kg): 31 Total price (RM): 24.50 Draw a flowchart of the solution. Write a complete C program based on the problem.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

C Language

SET A
Develop a self-service laundry calculator that reads laundry weight and drying time as inputs.
and calculate the total cost for the laundry service according to Table 1. Assume that
the maximum laundry weight is 25kg. Repeat the same task using repetition structure until
user enter 'n' for no. At the end of the program produce total weight and total cost for the
usage.
Table 1
Washer
Dryer
Weight (kg)
Cold (RM)
Price (RM)
Time
Every
<= 9
4.50
<= 14
6.00
1 minute
0.20
<=25
10.00
Use if...else statements or switch statements and loop where it is appropriate and create a
program with the following output (The numbers in bold/underline are user's input):
The sample output should be as follows:
**********LAUNDRY CALCULATOR*******
Please enter laundry weight (kg): 1
Please select drying time (min): 15
Price (RM): 7.50
Do you want to continue? y
Please enter laundry weight (kg): 31
Please select drying time (min): 20
INVALID INPUT !!
Do you want to continue? y
Please enter laundry weight (kg): 24
Please select drying time (min): 35
Price (RM): 17.00
Do you want to continue? n
Summary:
Total weight (kg): 31
Total price (RM): 24.50
(i)
Draw a flowchart of the solution.
Write a complete C program based on the problem.
Transcribed Image Text:SET A Develop a self-service laundry calculator that reads laundry weight and drying time as inputs. and calculate the total cost for the laundry service according to Table 1. Assume that the maximum laundry weight is 25kg. Repeat the same task using repetition structure until user enter 'n' for no. At the end of the program produce total weight and total cost for the usage. Table 1 Washer Dryer Weight (kg) Cold (RM) Price (RM) Time Every <= 9 4.50 <= 14 6.00 1 minute 0.20 <=25 10.00 Use if...else statements or switch statements and loop where it is appropriate and create a program with the following output (The numbers in bold/underline are user's input): The sample output should be as follows: **********LAUNDRY CALCULATOR******* Please enter laundry weight (kg): 1 Please select drying time (min): 15 Price (RM): 7.50 Do you want to continue? y Please enter laundry weight (kg): 31 Please select drying time (min): 20 INVALID INPUT !! Do you want to continue? y Please enter laundry weight (kg): 24 Please select drying time (min): 35 Price (RM): 17.00 Do you want to continue? n Summary: Total weight (kg): 31 Total price (RM): 24.50 (i) Draw a flowchart of the solution. Write a complete C program based on the problem.
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Random Class and its operations
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.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education