Answer to Question #218216 in C++ for abc deefgh

Question #218216

enter the number of nights, per night rate room service charge, and telephone charge

calculate the room charge by multiplying the numbr of nights by the per-night rate

calculate the total bill by adding together the room charge, room service charge, and telephone charge

display the total bill


1
Expert's answer
2021-07-17T10:41:45-0400
include <iostream>
using namespace std;


int main()
{
  double night_rate;
  double number_nights;
  double room_service;
  double telephone_charge;
  double  room_charge;
  double total_bill;
  cerr<<"enter the per-night rate: ";
  cin>>night_rate;
  cerr<<"Enter the number of nights: ";
  cin>>number_nights;
  cerr<<"Enter your room service fee: ";
  cin>>room_service;
  cerr<<"Enter your phone fee:";
  cin>>telephone_charge;
  room_charge = night_rate*number_nights;
  total_bill = room_charge+room_service+telephone_charge;
  cerr<<"The total bill was: "<<total_bill;
  return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS