-1

Write a complete C++ program that ask the user to input two integers,
then print if they are divisible by each other or not ( the division has no carry). If they
are divisible print their division results on each other. Make sure avoid the divide by
zero situation before testing their divisibility

....

Write a complete C++ program that calculates the cost of train ticket as
the following,
 If the passenger is an adult (i.e. +17 years old) his ticket costs 150 SR,
 If the passenger is a kid (i.e. 16~3 years old) his ticket costs 80 SR,
 If the passenger is a baby (i.e. less than 2 years old) his ticket costs 40 SR,
Also, if the passenger wants a meal on the train it cost for the adult is 25 SR, 15 SR
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.

2
Contributors
1
Reply
8
Views
3 Years
Discussion Span
Last Post by deceptikon
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.