Fix all syntax error in this program. Submit the correct program and clearly state which lines had problem and what the problems were.
#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;
string generateBall (); //function to generate random number
main ()
{
strin color;
char end;
srand(time(0));
while(cin){
color = generateBall;
cout << "You got a " << color << " Ball"<< endl;
cin >> end;
}
system ("PAUSE");
return 0;
}
string generateBall()
{
string color;
randnum = (rand()%9);
if (randnum <=4)
color="Red"
else
color = "Blue";