UNA HERMOSA MOTO

UNA HERMOSA MOTO

miércoles, 22 de abril de 2015

Problema Resuelto 09



09 .-  AREA DE UN CIRCULO

Resultado de imagen para AREA DE UN CIRCULO

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package problema9;
import java.io.*;
/**
 *
 * @author ABEL MONTALVAN
 */
public class Problema9 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException {
        // TODO code application logic here
    
    //const float PI = 3.14159F;
     final float  PI=3.14159f;
        float a,r;
    
 BufferedReader in =new BufferedReader(new  InputStreamReader(System.in));
 System.out.println("Radio: ");
        r=Float.parseFloat(in.readLine());
        
    a=(float)(PI*(Math.pow((double)r, 2.0)));
        
 System.out.println("");
 System.out.println("Área: "+a);

    }
}

No hay comentarios:

Publicar un comentario