I am trying to input a loop that displays income generated from ticket sales for 3 nights.. I keep receiving error messages even when I go to the line and think I fixed the problem. Any help would be great
// add the following lines at the beginning of the source file
#include <iostream>
usingnamespace std;
// create translation from generic keywords to C++
#define Declare
#define ByRef ref
#define Call
#define Constant const
#define Declare
#define Display cout <<
#define Eof cin.eof()
#define Function
#define Input cin >>
#define InputLine(x) getline(cin, x)
#define Integer int
#define Module
#define Newline endl
#define Real double
#define String string
#define Set
int main()
{
int A, B, C ;
int TotalIncome[3]
for (int i = 0; i< 3; i++);
{
cout << "Enter number of seats sold in Section A: \n";
cin >> A;
cout << "Enter number of seats sold in Section B: \n";
cin >> B;
cout << "Enter a number of seats sold in Section C: \n";
cin >> C;
while (A < 0 or A > 300)
{
cout << "ERROR: Seats sold in Section A cannot be \n";
cout << "greater than 300 or negative.\n ";
cout << "Enter valid value for seats sold in section A: \n";
cout << "A value in the range of 0 to 300 inclusive. \n";
cin >> A;
}
while (B < 0 or B > 500)
{
cout << "ERROR: Seats sold in Section B cannot be \n";
cout << "greater than 500 or negative.\n ";
cout << "Enter valid value for seats sold in section C: \n";
cout << "A value in the range of 0 to 500 inclusive. \n";
cin >> B;
}
while (C < 0 or C > 200)
{
cout << "ERROR: Seats sold in Section C cannot be \n";
cout << "greater than 200 or negative.\n ";
cout << "Enter valid value for seats sold in section C: \n";
cout << "A value in the range of 0 to 200 inclusive. \n";
cin >> C;
}
TotalIncome[i] = (A * 20) + (B * 15) + (C * 10);
}
for (int i=0; i<3; i++)
{
cout << "The total income generated from ticket sales \n ";
cout << "of all sections is $ " << TotalIncome[i];
}
}
}
ERRORS:
F:\CH7Q2Theater.cpp|27|error: 'i' was not declared in this scope|
F:\CH7Q2Theater.cpp|70|error: 'TotalIncome' was not declared in this scope|
F:\CH7Q2Theater.cpp|75|error: 'TotalIncome' was not declared in this scope|
F:\CH7Q2Theater.cpp|79|error: expected declaration before '}' token|