try to run checks it does not work, w

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 11PE
icon
Related questions
Question

as i try to run checks it does not work, what should i change to make the code work.

Tasks
main.cpp
+
>_ Terminal
rer
10cout<<"Enter the rent of single room:
sandbox $ rm -f a.out
sandbox $
sandbox $
Discounts stored as constants
|11cin>>cost;
12 cout<<"Enter the number of rooms needs to be booked: ";
13cin>>tot_room;
sandbox $ g++ -Wall -std3c++0
Correct outputs for less than 10
14cout<<"Enter the number of days for which rooms need to bx main.cpp
booked: ";
rooms
30 r
sandbox $ ./a.out
Enter the rent of single room
: 200
Enter the number of rooms nee
15cin>>days;
Correct outputs for 10 to 19 rooms
16cout<<"Enter the sales tax (in %): ";
17cin>>tax_amt;
ds to be booked: 35
18if(tot_room>=30)
Correct outputs for 20 to 29 rooms
Enter the number of days for
19dis_amt = 0.3;
%3D
which rooms need to be booked
| 20else if(tot_room>=20)
: 8
Enter the sales tax (in %): 5
The cost of renting one room
is 1040
Correct outputs for 30 or more
21 dis_amt = 0.2;
22 else if(tot_room>=1@)
rooms
23 dis_amt
= 0.1;
%3D
|24if(days>=3)
The discounted amount 35%.
25 dis_amt += 0.05;
The number of rooms booked is
26
35
cost*tot_room*days*(1-dis_amt);
total_cost/tot_room;
27 total_cost
%D
The number of days rooms book
ON
28 room_cost
29 cout<<"The cost of renting one room is "<<room_cost<<end1 Total cost = 36400
ed is 8
30cout<<"The discounted amount "<<100*dis_amt<< "%.\n";
Sales tax
1820
31 cout<<"The number of rooms booked is "<<tot_room<<endl;
32 cout<<"The number of days rooms booked is "<<days<<endl; sandbox $ ||
33cout<<"Total cost =
Total bill amount = 38220
ger
"<<total_cost<<endl;
(tax_amt*total_cost)/100;
"<<sales_tax<<endl;
34 sales_tax =
35 cout<<"Sales tax =
36 cout<<"Total bill amount =
"<<total_cost + sales_tax<<enc
37 return 0;
38}//end of main function
39
Run checks
O Submit 48%
+
Transcribed Image Text:Tasks main.cpp + >_ Terminal rer 10cout<<"Enter the rent of single room: sandbox $ rm -f a.out sandbox $ sandbox $ Discounts stored as constants |11cin>>cost; 12 cout<<"Enter the number of rooms needs to be booked: "; 13cin>>tot_room; sandbox $ g++ -Wall -std3c++0 Correct outputs for less than 10 14cout<<"Enter the number of days for which rooms need to bx main.cpp booked: "; rooms 30 r sandbox $ ./a.out Enter the rent of single room : 200 Enter the number of rooms nee 15cin>>days; Correct outputs for 10 to 19 rooms 16cout<<"Enter the sales tax (in %): "; 17cin>>tax_amt; ds to be booked: 35 18if(tot_room>=30) Correct outputs for 20 to 29 rooms Enter the number of days for 19dis_amt = 0.3; %3D which rooms need to be booked | 20else if(tot_room>=20) : 8 Enter the sales tax (in %): 5 The cost of renting one room is 1040 Correct outputs for 30 or more 21 dis_amt = 0.2; 22 else if(tot_room>=1@) rooms 23 dis_amt = 0.1; %3D |24if(days>=3) The discounted amount 35%. 25 dis_amt += 0.05; The number of rooms booked is 26 35 cost*tot_room*days*(1-dis_amt); total_cost/tot_room; 27 total_cost %D The number of days rooms book ON 28 room_cost 29 cout<<"The cost of renting one room is "<<room_cost<<end1 Total cost = 36400 ed is 8 30cout<<"The discounted amount "<<100*dis_amt<< "%.\n"; Sales tax 1820 31 cout<<"The number of rooms booked is "<<tot_room<<endl; 32 cout<<"The number of days rooms booked is "<<days<<endl; sandbox $ || 33cout<<"Total cost = Total bill amount = 38220 ger "<<total_cost<<endl; (tax_amt*total_cost)/100; "<<sales_tax<<endl; 34 sales_tax = 35 cout<<"Sales tax = 36 cout<<"Total bill amount = "<<total_cost + sales_tax<<enc 37 return 0; 38}//end of main function 39 Run checks O Submit 48% +
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 5 images

Blurred answer
Knowledge Booster
Binary numbers
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
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L