program that input the radius of a circle and find its perimeter
Answers
Answered by
5
Answer:
/Java program to Calculate Perimeter of a Circle.
import java.util.Scanner;
public class PerimeterCircle {
public static void main(String[] args) {
double radius;
Scanner sc= new Scanner(System.in);
// input radius of circle. ...
radius=sc.nextDouble();
// circle parameter is 2 * pie * radius
Answered by
4
Assignment method
class circle
{
public static void main ( String args [])
{
int r = 7 (as per you);
double p= 2*(22/7.0)*r;
System.out.println("perimeter"+p);
}
}
CLA method
class circle
{
public static void main(int r)
{
double p= 2*(22/7.0)*r
System.out.println("perimeter "+p);
}
}
Similar questions