#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;
int bowl()
{
srand(time(NULL));
int arr[37]={0,0,0,0,1,1,2,2,3,3,4,4,4,5,5,5,6,6,6,6,6,7,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10};
int RandIndex = rand() % 37 ;
if (9 >= arr[RandIndex] >= 1)
{
cout<<"You knocked down "<< arr[RandIndex]<< " pins!"<<endl;
}
if (arr[RandIndex]== 10)
{
cout<<"Strike!"<<endl;
}
if (arr[RandIndex]== 0)
{
cout<<"You threw a gutterball :("<<endl;
}
I only want it to execute the last if statement
}
int main()
{
bowl();
}