Question

An airline company needs a program to convert pounds to kilograms for passengers to determine baggage...

An airline company needs a program to convert pounds to kilograms for passengers to determine baggage weight in kilograms. Write a C++ program that displays the prompt: Enter pounds. After the user responds to the prompt, the program should calculate the number of kilograms and display the result with a short message. One kilogram = 2.2 pounds.

The program should then determine the cost of the bag, which is $3.00 per kilogram if the bag weighs more than 21 kilograms; otherwise the cost is free. Display the cost with a short message. Do not code any comments, includes, setw, or setios flags. Be sure to include consts and int main(). Key the answer in the answer box.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

#include <iostream>
using namespace std;

int main()
{
float pounds,kg,cost;
cout<<"Enter Pounds: ";
cin>>pounds;
kg=pounds/2.2;
cout<<"weight in kilogram is: "<<kg<<" KG"<<endl;
if(kg>21)
{
cost=(kg-21)*3;
}
else
cost=0;

cout<<"Cost is "<<cost<<endl;
return 0;

}

//note: if you have any queries then comment below.

Add a comment
Know the answer?
Add Answer to:
An airline company needs a program to convert pounds to kilograms for passengers to determine baggage...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Create a Java Program to calculate baggage charges. Here are the rules: A. Two bags per...

    Create a Java Program to calculate baggage charges. Here are the rules: A. Two bags per person are free. B. The Excess Bag Charge is $75 per bag. The program needs to do the following: 1. In your main method(),    Create integers to store the number of Passengers and also the total number of bags    Prompt for the number of passengers on a ticket.    Prompt for the total number of bags for all passengers on a ticket....

  • ifelse2 Ward References Mailings Review ew Subtitle Title TNO ::E . 12 . .|TI Emphasis Heading...

    ifelse2 Ward References Mailings Review ew Subtitle Title TNO ::E . 12 . .|TI Emphasis Heading i LNormal! Strong 18-y.A-l าร Styles Paragraph Unit Form Selection Exercises #2 Standards Focus: input/output,restrictive input, formatted output, logic, design, Boolean and logical operators, String class method usage 1. Our program will convert a weight expressed in pounds into kilograms a. Our input is the weight in pounds b. Our output is the weight in kilograms c. We also know that Kilograms Pounds /2.2...

  • MANAGERIAL CHALLENGE Why Charge $35 per Bag on Airline Flights? American Airlines (AA) announced that it...

    MANAGERIAL CHALLENGE Why Charge $35 per Bag on Airline Flights? American Airlines (AA) announced that it would immediately begin charging $35 per bag on all AA flights, not for extra luggage but for the first bag! Crude oil had crushed from $54 to $20 per barrel in the previous 3 months. AA’s new baggage policy applied to all ticketed passengers except first class and business class. On top of incremental airline charges for sandwiches and snacks introduced the previous year,...

  • Use both pseudocode and flowcharts to solve the problems below: 1. Write a program that converts...

    Use both pseudocode and flowcharts to solve the problems below: 1. Write a program that converts a user-entered Fahrenheit temperature to equivalent Celsius temperature. Use the formula c = (5 / 9) * (f - 32) where c is representing a Celsius temperature and f a Fahreinheit temperature. 2. A program is required that will read two operands and print the product to a file. 3. A program will ask the user to enter his/her name. Upon entering the name...

  • (2 bookmarks) In JAVA You have been asked to write a program that can manage candidates...

    (2 bookmarks) In JAVA You have been asked to write a program that can manage candidates for an upcoming election. This program needs to allow the user to enter candidates and then record votes as they come in and then calculate results and determine the winner. This program will have three classes: Candidate, Results and ElectionApp Candidate Class: This class records the information for each candidate that is running for office. Instance variables: first name last name office they are...

  • Name: True/False & Multiple Choice (2 points each) (True / False ) 2 A char literal...

    Name: True/False & Multiple Choice (2 points each) (True / False ) 2 A char literal '2', a string literal "2", and the numeric literal 2 are identical and stored the same way though they are different types. 3 Since comments do not affect the program execution, you don't need to have it at all. 4. After the following statements are executed, the value of the variable rem is 3. 1. A preprocessor directive line starts with a pound sign...

  • What happened on United flight 3411?What service expectations do customers have of airlines such ...

    What happened on United flight 3411?What service expectations do customers have of airlines such as United and How did these expectations develop over time? Thank You! In early April 2017, United Airlines (United), one of the largest airlines in the world, found itself yet again in the middle of a service disaster this time for forcibly dragging a passenger off an overbooked flight. The incident was to become a wake-up call for United, forcing it to ask itself what to...

  • SYNOPSIS The product manager for coffee development at Kraft Canada must decide whether to introduce the...

    SYNOPSIS The product manager for coffee development at Kraft Canada must decide whether to introduce the company's new line of single-serve coffee pods or to await results from the product's launch in the United States. Key strategic decisions include choosing the target market to focus on and determining the value proposition to emphasize. Important questions are also raised in regard to how the new product should be branded, the flavors to offer, whether Kraft should use traditional distribution channels or...

  • How can we assess whether a project is a success or a failure? This case presents...

    How can we assess whether a project is a success or a failure? This case presents two phases of a large business transformation project involving the implementation of an ERP system with the aim of creating an integrated company. The case illustrates some of the challenges associated with integration. It also presents the obstacles facing companies that undertake projects involving large information technology projects. Bombardier and Its Environment Joseph-Armand Bombardier was 15 years old when he built his first snowmobile...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT