ticket prices - some errors so it doesn't run

trying to get it to run 12 times.please help!!

//Write a C++ program to get the input of number of tickets for an amusement
//park. Each ticket costs $ 5.50.
//Every fifth ticket is free.
//If any person is less than 5 or greater than 65 (by age), then they get a
//discount of 1.08.
//Calculate the total price for group of visitors.
//Specification: You can either use do-while / while / if-else if / switch

#include <iostream>
#include <iomanip>
using namespace std;

int main()
{
//variables
int age;
int i;
int numberTickets = 0;
double total = 0.0;
double normalPrice;
double discountPrice;

//every 5th ticket is free
do
{
numberTickets (1, 12);
if (i % 5 == 0)
{
cout << "your ticket is free!" << endl;
continue;
}
if (i < 5 || i > 65)
{
discountPrice = 5.50 - 1.08;
cout << "your ticket is discounted!" << discountPrice << endl;
}
else
{
(i >= 5 || i <= 65 );
normalPrice = 5.50;
cout << "your ticket is: " << normalPrice << endl;
}

//display total
cout << fixed << showpoint << endl;
cout << "The total is $ " << total << endl;
return 0;
}while (discountPrice < normalPrice);
}
Last edited on
What are you doing with:

numberTickets(1, 12);
Topic archived. No new replies allowed.