ERROR HELP

Write your question here.

[code]
Put the code you need help with here.
[/CODE {
int i;
for (i = 0; i <= 99; i++)
{
int b[99], a=0, sum=0;
if (a < 6)
cout << "Enter roll result for player A";
cin >> b[i];
a = b[i];
sum += b[i];
if (sum = 100) { cout << "Player A has won"; }
else { cout << "play again no winner"; }
}
}
]THIS CODE IS GIVING ME THE ERROR THAT THE LEFT BRACE IN LINE FOUR THAT IS THE FIRST LEFT BRACE IS UNMATCHED AT THE END OF THE LINE.I DO NOT SEEM TO LOCATE WHERE TO CORRECT IT.THANK YOU IN ADVANCE
vISUAL STUDIO C++ console application.
[C/CODE is not part of my program.if i remove left brace({) i will not be bale to declare my variable it will give me an error right awsy
here is another one same error.
#include <iostream>
using namespace std;
int main()
{int i;
for (i = 0; i <= 6; i++) {

int a[100], b[100];
cout << "Player A Enter the die roll result";
cin >> a[i];
if (a[i] < 6) { cout << "player B turn"; }
else if (a[i] = 6) {
int j;
for (j = 0; j <= 2; j++)
{
int e[2];
cout << "Enter the number of times you rolled a 6 in your turn";
cin >> e[j];
if (e[j] <= 2)
cout << "Player A Enter the die roll result";
cin >> a[i];
}
}
else { cout << "Your score is zero for this turn"; }




cout << "Player B enter the die roll result\n";
cin >> b[i];
if (b[i] < 5) { cout << "player A turn\n"; }

else if (b[i] = 6) {
int k;
for (k = 0; k <= 2; k++)
{
int f[2];
cout << "Enter the number of times you rolled a 6 in this turn\n";
cin >> f[k];
if (f[k] <= 3) { cout << "Player B enter roll result\n"; }
else {
cout << "Your score is zero for this turn.Player A turn\n";
}
}
}
int c = 0, d = 0;
c += a[i];
d += b[i];
cout << c << endl;
if (c >= 100) { cout << "Player A has won\n"; }
else if (d >= 100) { cout << "Player B has won\n"; }
else { cout << "No winner"; }
}
}

Topic archived. No new replies allowed.