Você está na página 1de 1

import javax.swing.

JOptionPane;
public class dois {
public static void main(String args[])
{
String A, B, C;
float CotacaoDolar, QuantDolar, ValReal;
A = JOptionPane.showInputDialog ("Digite a Cotao do Dolar");
CotacaoDolar = Float.parseFloat(A);
B = JOptionPane.showInputDialog ("Digite a quantia em Dolar");
QuantDolar = Float.parseFloat(B);
ValReal = QuantDolar * CotacaoDolar;
JOptionPane.showMessageDialog(null, "Valor em Real: " + ValReal,
"resposta",1);
}
}

Você também pode gostar