Answered step by step
Verified Expert Solution
Question
1 Approved Answer
# Process the second order carpet _ price _ per _ sqft 2 , room _ width 2 , room _ length 2 = map
# Process the second order
carpetpricepersqft roomwidth roomlength mapfloat inputsplit
roomareasqft roomwidth roomlength
carpetcost roomareasqft carpetpricepersqft
laborcost roomareasqft
totalcost carpetcost laborcost
salestax totalcost
totalcostwithtax totalcost salestax
# Output information for the second order
print
Order #
printfRoom: roomareasqft sq ft
printfCarpet: $carpetcost:f
printfLabor: $laborcost:f
printfTax: $salestax:f
printfCost: $totalcostwithtax:f
# Calculate and output total sales for both orders
totalsales totalcostwithtax totalcostwithtax
printf
Total Sales: $totalsales:f
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started