try to run checks it does not work, w

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

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.
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