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.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 7RQ
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
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
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT