UNA HERMOSA MOTO

UNA HERMOSA MOTO

miércoles, 22 de abril de 2015

Problema Propuesto 09



09.- ÁREA Y PERÍMETRO DE UN RECTÁNGULO

Resultado de imagen para AREA Y PERIMETRO DE UN RECTANGULO

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package porpuesto009;
import java.io.*;
import java.util.Scanner; 
/**
 *
 * @author abel montalvan
 */
public class Porpuesto009 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException {
     Scanner ap = new Scanner (System.in);
        double a, b ,c;
System.out.println("Área y perímetro de un Rectagulo");
System.out.println("Ingrese el valor de a");
a= ap.nextInt();
System.out.println("ingrese el valor de b");
b= ap.nextInt();
double area= a*b;
double perimetro=2*a+2*b;
System.out.println("El Área de un rectángulo es = " + area);
System.out.println("El  Perímetro de un rectángulo es = " + perimetro);

    }
}

No hay comentarios:

Publicar un comentario