Mentely es eso espero q te ayude :)
Answer:
An error will be occurred here. In C++ a function must be like
returntype function_name(){
}
but the functions in given class does not have returntype given. So there will be a syntax error.
If the returntype is defined then the code does not show any output since nothing is printed in the main function.
Answer:
The first thing should Keisha does is determine the purpose of the presentation.
Explanation:
If we are giving any presentation then firstly we should determine the purpose of our presentation.
There are typical reasons for giving any presentation such as:
- Alerting
- Persuading
- Inspiring
- Enjoyable
By clearly defining the purpose you need to capture the attention of your audience and maintain their interest thoroughly across the oral presentation. Three key elements in any oral presentation process include:
- Planning
- Writing
- Completion
The simulation, player 2 will always play according to the same strategy.
Method getPlayer2Move below is completed by assigning the correct value to result to be returned.
Explanation:
- You will write method getPlayer2Move, which returns the number of coins that player 2 will spend in a given round of the game. In the first round of the game, the parameter round has the value 1, in the second round of the game, it has the value 2, and so on.
#include <bits/stdc++.h>
using namespace std;
bool getplayer2move(int x, int y, int n)
{
int dp[n + 1];
dp[0] = false;
dp[1] = true;
for (int i = 2; i <= n; i++) {
if (i - 1 >= 0 and !dp[i - 1])
dp[i] = true;
else if (i - x >= 0 and !dp[i - x])
dp[i] = true;
else if (i - y >= 0 and !dp[i - y])
dp[i] = true;
else
dp[i] = false;
}
return dp[n];
}
int main()
{
int x = 3, y = 4, n = 5;
if (findWinner(x, y, n))
cout << 'A';
else
cout << 'B';
return 0;
}