Monday, 8 October 2012

mencari volume kerucut

tugas eresha 1
oleh  : abdul hamid

1.mencari volumekerucut

 2.flowchart

 




 import  java.util.Scanner;
public class Volume_kerucut
{
  public static void main(String args[])
    {
      Scanner masuk=new Scanner(System.in);
      float volume;
      int jari, tinggi;
      System.out.print("Masukan jari-jari kerucut = ");
      jari=masuk.nextInt();
      System.out.print("Masukan tinggi kerucut = ");
      tinggi=masuk.nextInt();
      volume=1f/3f*22f/7f*jari*jari;
      System.out.println("Volume kerucut = "+volume);
   }
}