Please help C++

Posted by SteelDog37 on Thu 03 Nov 2011 01:00 AM — 4 posts, 19,646 views.

#0
This is what I have so far....

#include <iostream>
#include <iomanip>

using namespace std;

int main()
{
{char discount;
int age;
double price;
cout << "How old are you? ";
cin >> age;
if(age > 17)
price = 8;
else
price = 6;
cout << "Do you have a discount coupon(y/n)?\n";

}

I can not figure out why this will not compile and run? Need some help? My question to the problem is below..

Design a program that ask a user for their age and whether or not they have a discount coupon. If they are over the age of 17 then the ticket price is $8.00. If they are not over 17 then the ticket price is $6.00. If they input y for coupon then the ticket price discount is 25%.
USA #1
SteelDog37 said:
I can not figure out why this will not compile and run? Need some help? My question to the problem is below..

1. Paste any errors you have. If you don't paste the errors, we don't know where to look.

2. There's a { before char discount that shouldn't be there.
#2
Thanks Twisol sorry for not posting or pasting the error.
USA #3
No problem.