Computer Science, asked by bhavikagarg8, 1 year ago

int GetJumpCount(int input1,int input2,int input3_size, int* input3)
{
what will be code of this question?
sample input is
10
1
1
10
output is
1
input means
first no represent the how much meter monkey ji=ump
secon no
due to slippary wall he falls y metres after jump
third define the size of wall he jump
fourth height of each wall according to size

output
total no of jumps he has make to escape from the jail





plz tell m the code of this


praneethworldtoper: i didn't get this question

Answers

Answered by sawakkincsem
0
You should write a program, first of all, you will add input format which will be the following: 

1. An integer depicting X
2. An integer depicting Y
3. And an array of N integers which will be having the height of the wall

following will be the constraints:

1< = X <=109
1< = Y <= 105

and the output format will be the following:
The program should be able to return the total number of jumps which are required to escape.

for example there is a test case
sample input 
10
1
1
10

the sample output will be 
1

the explanation for this is:
that the activist can jump 10 meters high but also slides down by 1 meter and there is a 1 wall which he wants to jump and the height of the wall is also 10 meters. So when he jumps 10 meters in the first attempt he will be able to cross the wall easily in the first attempt.
Answered by alinakincsem
0
The program should be written in a way that the input information should be added and the integers should be used for X and Y and N will be used to show the height of the wall, with the following program the jumps can be measured.

1< = X <=109
1< = Y <= 105

With the above-mentioned program, the answer will be 1 and the activist will be able to escape on his first attempt because there is only 1 wall and the height of the wall is 10 meters, so the activist will be able to jump the wall and be able to escape in his first attempt.
Similar questions