0
Write java code Which allow a user to enter the radius of the circle then calculate the area?
2 Respostas
0
double area = Math.PI * r * r;
0
import java.util.scanner
class circle{
public static void main (String [] s){
Scanner sc = new Scanner (System.in);
System.out.print("Enter radius: ");
double r = sc.nextDouble ();
double area = Math.PI *r * r;
System.out.println ("Area = " + area);
}
}