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;
}
<u>Answer</u>:
To quickly modify fonts, colours, and effects on a slide, a user can modify the Theme.
<u>Explanation</u>:
In Microsoft power point a theme is a group or collection of fonts , colours and effects that are pre-formatted to improve or enhance the presentation. We can start changing the font , colours or effects or any pre-existing themes by selecting them.
To Change colour:
- In Design tab, under the Variants group, click on the downward and choose one colour from the colour variant gallery.
- Now click on the customise colours which opens the "Create New Theme Colours" dialog box. In this dialog box , in the theme colours we can make the necessary changes and save them as a new theme.
To change fonts:
- In the View tab, choose Slide Master.In this tab, select "Fonts" and then select Customise Fonts.
- Now "Create New Theme Fonts" dialog box opens where use can choose the required font size under the Heading font and Body font boxes. Again this can be saved as a new theme. Changing the font of theme changes all the bullet texts and title.
B) Contact metamorphism can occur.
You have to subtract the tax amount by the final amount then multiply the result by the percentage of tip that is based on the service that you received.
Answer:
Know the sport really well so you can anticipate the moment when something exciting might happen. - c