Question: ***Please do it in C++*** Write a program that takes input age(int type), price (double type) for a air ticket, category(char type). The program calculates

 ***Please do it in C++*** Write a program that takes input

age(int type), price (double type) for a air ticket, category(char type). The

***Please do it in C++***

Write a program that takes input age(int type), price (double type) for a air ticket, category(char type). The program calculates the final price of the air ticket depending on the following criteria . if age or price is less than or equal to ZERO, it should output Wrong input .if age is greater than 0 and less than or equal to 5 and if the category is neither A nor a' discount applied is 100% and if the category is either A or a, discount applied is 0% .if age is greater than 5 and less than or equal to 12 and if the category is neither B nor b, discount applied is 50% and if the category is either B or b, discount applied is 0% .if age is greater than 12 and less than or equal to 26 and if the category is neither C nor C, discount applied is 60% and if the category is either C or c, discount applied is 0% . if age is greater than 26 and less than or equal to 60 and if the category is neither D nor d, discount applied is 70% and if the category is either D or d, discount applied is 0% if age is greater than 60 and if the category is neither E nor e, discount applied is 80% and if the category is either E or e, discount applied is 0% Your program should output the final price. You have to use both if and else statements to write your code Formula for calculating final price final_price price-price discount)/100)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!