Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

I need some assistance in figuring out why I am receiving error code

I need some assistance in figuring out why I am receiving error code C2065 in the below code:// Week 3

Assignment-1
// Description: Compile time errors with loops and branching
//———————————-

//**begin #include files************
#include // provides access to cin and cout
#include // to allow seeding the random number generator using time
//–end of #include files———–
//———————————-

using namespace std;
//———————————-

//**begin global constants**********
const int arraySize = 5;
//–end of global constants———
//———————————-

//**begin main program**************
int main()
{
// seed random number generator
srand(time(NULL));
// create a flag to end the while loop
bool endLoop = false;
// create an int array
int array[arraySize];
// initialize the int array
for (int i = 0; i {
array[i] = (rand() % 50) + 50;
}
int number;
int mysteryNum;
int arrayNum;
while (!endLoop)
{
mysteryNum = rand() % 40;
arrayNum = array[rand() % arraySize];
cout cin >> number;
if (mysteryNum == arrayNum – number)
{
cout }
else
{
cout endLoop = true;
}
}
cin.get();
// Wait for user input to close program when debugging.
cin.get();
return 0;
}
//–end of main program————-
//———————————-

VS 2015 is telling me ‘i’: undeclared identifier at array[i] = (rand() % 50) + 50; line of code.  Any help will be greatly appreciated

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"