Computer Science, asked by ananya31838, 9 months ago

the time period of a simple pendulum is given by the formula : T = 2 r √1/g
Write a program to calculate the time period of a simple pendulum by taking length and acceleration due to gravity as input.
"Java program"
In function arguments method​

Answers

Answered by Anonymous
2

Answer:

to accept an integral value 'p' through Stream Class

InputStreamReader read = new InputStreamReader(System.in);

BufferedReader in = new BufferedReader(read);

int p = Integer.parseInt(in.readLine());

Question 2

to accept a fractional value (float) 'm' through Scanner Class

Scanner in = new Scanner(System.in);

float m = in.nextFloat();

Similar questions