Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

01: Write a simathrm{C}++ program for an Airline company to work out the total cost of tickets reservation. The program should prompt the Airline agent

image text in transcribed

01: Write a simathrm{C}++ program for an Airline company to work out the total cost of tickets reservation. The program should prompt the Airline agent to read the number of adult passengers and the price of the ticket per adult, and the number of children travelling and the price per ticket for each child. The progran should then let the airline agent to enter the tax percentage and the progran should calculate and prints the total cost on the screen. Sample input / output Enter number of adult passengers: 2 Enter price of ticket per adult: 600 Enter nunber of children: 3 Enter price of ticket per child: 350 5:5 Enter tax percentage: 51.055 The total cost is 515 2352.55 03: A Dubai based shipping company uses the following table to calculate the cost can Dirhans) of shipping based on the weight of the package in Kilograns. $5 c(W)=\left\{\begin{array}1) 3.5, text (it) 5.5, text (if ) 13 8.5, \text { if ) 3 =10 10.5, \text { if ) 1020 Vend(array) ight 55 Write a C++ program that prompts the user to enter the weight of the package and display the shipping cost. If the weight is greater than 50 . display a message "The package cannot be shipped. For negative and zero weights the program should print 'Invalid weight message. Sample inout / output: Enter the weight of the package: 50.755 Enter the weight of the package: 52.55 The shipping cost is $3.55 Dhs The shipping cost is 55.55 Dhs Enter the weight of the package: 5 Enter the weight of the package: $16.25 The shipping cost is $8.55 Dhs The shipping cost is $10.55 Dhs 04: Write a sunathrn(C)++ program that helps an instructor to calculate the total marks and compute its corresponding grade for a subject. Let the subject marks consist of three itens, 1.c. \begin tabular Icic Whline Iten & Marks Whline Course work & 525 15 Whline Lab work & 525 15 Whline Final exam & 550 15 Whline Total & 5100 15 Whline Vend(tabular The program let the user inter marks for each course iten, calculate total marks of the subject, and compute grade of the subject based on the following table. \begin(tabular) Cicci) Whline Grade & Percentage 1 thline F & 50-59 5 Whline D & 550-59 15 Thline C & 570-19 15 Whline B & 550-59 15 Whline 4 & 590-100 15 Whline Vand tabular Sample input/output Enter course work, lab work and final exan narks $20.518 540 .05 Total Marks: 79 Grade: C Enter course work, lab work and final con marks $17.810 .235.15 Total Marks: 554.15 Grade: D SE.S0.0171

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Demystified

Authors: Andrew Oppel

1st Edition

0072253649, 9780072253641

More Books

Students also viewed these Databases questions

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago