#include <iostream>
using namespace std;
void ticket (float);
int main ()
{
float age= 0;
cout << "Welcome to the Theater!" << endl;
cout << "Enter your age: ";
cin >> age;
cout << "Ticket price: $";
ticket (age);
cout <<".00" <<endl;
system ("PAUSE");
return 0;
}
void ticket (float age)
{
if (age <=12 && age >=62)
cout << "2";
else
cout <<"4";
}
Thanks all.

New Topic/Question
Reply




MultiQuote




|