Computer Science, asked by BrainMaster143, 1 year ago

Plz help me in the program Tommorow is my xam plzz help.
Q 13

Attachments:

Answers

Answered by mn121
2

import java.util.*;

public class monkey

{

public static void main(String args[])

{

Scanner in = new Scanner(System.in);

double h,l=5,s;

int a=0;

System.out.println("enter height of the pole = ");

h= in.nextDouble();

while(l<h)

{

a++;

s=l*2/100.0;

l=l+5-s;

}

System.out.println("attempt made = "+a);

}

}

hope it helps you...

please mark it as brainliest...

^_^

Answered by mehtadharmil47
0

Answer:

Explanation:

import java.util.*;

public class monkey

{

public static void main(String args[])

{

Scanner in = new Scanner(System.in);

double h,l=5,s;

int a=0;

System.out.println("enter height of the pole = ");

h= in.nextDouble();

while(l<h)

{

a++;

s=l*2/100.0;

l=l+5-s;

}

System.out.println("attempt made = "+a);

}

Similar questions