Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A movie theater has a normal ticket price of $12. For shows that start between 7

ID: 3862525 • Letter: A

Question

A movie theater has a normal ticket price of $12. For shows that start between 7 pm and 1 am, there no discount. For shows that start at other times, there are special prices for the following age ranges: individuals whose under 12 pay only $8; individuals, whose age is between 12 and 16 inclusive, pay only $10; individuals whose age is 65 or over pay $9.50. VBA function that gets the individual's age from the worksheet and retums the ticket i cost. Your function can get the current time of day in hours (on a 24 hour clock) by a statement like timeHr For example f the time was between 7 pm and 7:59:59 pm, the statement tmeHrs Hour(Now) would return a valua of You must Use an if -elseif- else -endif structure. Call m o Problem 3

Explanation / Answer

Source Code:-

#include <iostream>

using namespace std;
int VBA(int age, int time);
int main()
{
int tm,ag;
cout<<"enter time and date:";
cin>>tm>>ag;
VBA(ag,tm);
   return 0;
}
int VBA(int age, int time)
{
if(time>=19 && time<=24 || time ==1)
{
cout<<"there is no discount";
}
else
{
if(age>12)
{
cout<<"price is:"<<"$8";
}
else
if(age>=12 && age<=16)
{
cout<<"price is:"<<"$10";
}
else
if(age>=65)
{
cout<<"price is:"<<"$9.50";
}
}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote