please your help

hey every one, i have a qestion and i have just one day to answer it ,so i really need your help friends.

here is it
Write a complete C++ program thatcalculates the cost of train ticket as the following,

If the passenger is an adult (i.e. +17 years old) his ticket
costs 150 $,

If the passenger is a kid (i.e. 16~3 years old) his ticket costs 80 $,

If the passenger is a baby (i.e. less than 2 years old) his ticket costs 40 $,
Also, if the passenger wants a meal on the train it cost for the
adult is 25$, 15 $ for the kids meal and the baby meal is for free.
If the passenger has a discount coupon he gets 15% off the total cost.

in this questio i should only use if statment or switch.

thank you
Alas, you are asking us to write code. The assignment is pretty straight-forward.

Can you write a functioning program with a main()?

Can you cout a question and cin an answer?

What two questions must you ask?

What is the math for each one?

If you are unsure about writing an if statement or a main() program, look at the tutorial on this site.

Good luck!
thank you so much for your answer acctuly i have to use only if statement or switch.

yes i need a code , the code should be look like this.
as example,

"welcome to the train ticket cost calculator "
how old are you ?? 22

tickets for adult................, without meal, do you want meal
(y,n) ?
y
the meail will cos 25$ , your total is 175 , do you have a cobon (y,n)?

your total cost after cobon is :148.


that all



You missed the point. Few here are willing to do your homework for you. The point is for you to learn to do it yourself.
I know duoas but i really did my best with it but it dose not run with me and i dont know why , and i solve all my question accept that so that why i said i need your .help,anyway thank you friend for your help
Post your code and we'll help you with it.
Topic archived. No new replies allowed.