Java [009] – Programa para calcular a área de um retângulo

Uma pequena revisão antes de prosseguirmos com assuntos novos.


package aulas;
public class Aula_09 {
 public static void main(String[] args){

 double base, altura, areaRetangulo;

 base = 10.34;
 altura =20;
 areaRetangulo = base * altura;

 System.out.println("A area de um retangulo de base = " + base);
 System.out.println("e altura " + altura);
 System.out.println("é " + areaRetangulo);

 }
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s