aykuta3474 / depoo

0 stars 0 forks source link

Daire #4

Open aykuta3474 opened 2 years ago

aykuta3474 commented 2 years ago

import java.util.Scanner;

public class dairenincevresivealnıhesaplama { public static void main(String[] args) { int r; double pi= 3.14;

    Scanner inp= new Scanner (System.in);
    System.out.println("dairenin yarıçapını giriniz:");
    r=inp.nextInt();
    double alan= pi*r*r;
    double cevre= 2*pi*r;

    System.out.println("dairenin alanı:" +alan);
    System.out.println("dairenin cevresi:"+cevre);

}

}