Question: What mistake did make in this program? #include #include using namespace std; int main ( ) { const int apple = 0 ; const int

What mistake did make in this program?
#include
#include
using namespace std;
int main(){
const int apple =0;
const int doc =1;
const int horse =2;
int seed;
cout << "Enter seed for random number generation: ";
cin >> seed; // Input seed for random number generation
srand(seed); // Seed the random number generator
string player1, player2;
cout << "Enter names of player 1 and player 2: ";
cin >> player1>> player2; // Input player names
int rounds = rand()%10+1; // Generate a random number of rounds (1 to 10)
cout << player1<<" vs "<< player2<<" for "<< rounds <<" rounds" << endl;
return 0;
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!