01.08.2023
0
Like
16
Views
package Baslangic;
import java.util.Scanner;
public class daire {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
// pi*r*r alan formülü
int r;
double pi=3.14;
System.out.print("Dairenin yarı çapını giriniz : ");
r = input.nextInt();
double alan = pi*r*r;
double cevre= 2*pi*r;
System.out.println("Dairenin alanı : "+ alan);
System.out.println("Dairenin çevresi : "+ cevre);
}
}
You need to log in to be able to comment!