Computer Science, asked by swastisharma027, 5 hours ago

WAP in java to calculate the time period of a simple pendulum​

Attachments:

Answers

Answered by 1980seemamishra
3

Answer:

import java.util.Scanner;

public class KboatSimplePendulum

{

public static void main(String args[]) {

Scanner in = new Scanner(System.in);

System.out.print("Enter length: ");

double l = in.nextDouble();

System.out.print("Enter g: ");

double g = in.nextDouble();

double t = 2 * (22.0 / 7.0) * Math.sqrt(l/g);

System.out.println("T = " + t);

}

}

Explanation:

hope it helps you

please mark me as brainliest army (◍•ᴗ•◍)❤(◍•ᴗ•◍)❤(◍•ᴗ•◍)❤

Similar questions