Calculate Laundry Cost
This problem is based on a simple laundry payment. A laundry shop charges customers based on how many kilograms of clothes they bring in.
You are given the clothing weight and the price per kilogram. Your task is to calculate the final total cost.
For example, if the weight is 6 kilograms and the price is 4 per kilogram, the answer is 24.
So the task is to multiply the laundry weight by the price per kilogram and return the result.
Example Input & Output
Multiply the weight by the price per kilogram.
6 kilograms at 4 per kilogram gives a total of 24.
No laundry weight means no cost.
Algorithm Flow

Solution Approach
A simple way to solve this is to use multiplication.
First, read the clothing weight and the price per kilogram. Then multiply those two values together.
The formula is:
That gives you the full laundry bill.
Once you have the result, print it as the answer.
The logic is short because the total comes from one direct calculation.
Best Answers
Solutions Coming Soon
Verified best solutions for this Challenge are still being analyzed and will be available soon.
Comments (0)
Join the Discussion
Share your thoughts, ask questions, or help others with this Challenge.
