#include <iostream>
#include <ctime>
#include <cstdlib>
#include <string>
using namespace std;
int bowl()
{
srand(time(NULL));
for(int x=0;x<9;x++)
{
cout<<"Frame"<<x+1<<endl;
int arr[49]={0,0,0,0,1,1,1,1,1,2,2,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,4,5,5,5,6,6,6,6,6,7,7,7,7,7,8,8,8,9,9,9,10,10,10};
int RandIndex = rand() % 49 ;
if (9 >= arr[RandIndex] >= 1 and arr[RandIndex] != 0)
{
cout<<"You knocked down "<< arr[RandIndex]<< " pins!"<<endl;
int RandNumber = rand() % 49 ;
if (arr[RandNumber]+arr[RandIndex] >= 10)
{
cout<<"Spare!"<<endl;
}
else
if (9>=arr[RandNumber]>=1 and arr[RandNumber] != 0)
{
cout<<"You knocked down "<< arr[RandNumber]<< " pins!"<<endl;
arr[RandNumber]+arr[RandIndex]=;
}
else
{
cout<<"You threw a gutterball:("<<endl;
arr[RandNumber]+arr[RandIndex]=;
}
}
if (arr[RandIndex]== 10)
{
cout<<"Strike!"<<endl;
cout<<"X"<<endl;
}
if (arr[RandIndex]== 0)
{
cout<<"You threw a gutterball :("<<endl;
int RandNumber = rand() % 49 ;
if (arr[RandNumber]+ arr[RandIndex] >= 10)
{
cout<<"Spare!"<<endl;
}
else
if (9>=arr[RandNumber]>=1 and arr[RandNumber] != 0)
{
cout<<"You knocked down "<< arr[RandNumber]<< " pins!"<<endl;
arr[RandNumber]+arr[RandIndex]= ;
}
else
{
cout<<"You threw a gutterball:("<<endl;
arr[RandNumber]+arr[RandIndex]= ;
}
}
cout<<Total<< endl;
}
}
int main()
{
bowl();
}