Respostas

2013-09-19T23:43:01-03:00
Import java.util.Scanner;
public class JavaApplication16 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner entrada = new Scanner(System.in);
       
        System.out.println("Digite o valor de A: ");
        double A = entrada.nextDouble();
       
        System.out.println("Digite o valor de B: ");
        double B = entrada.nextDouble();
       
        double X = A + B;
       
        if(X >= 10) {
            X = X + 5;
            System.out.print(X);
        } else {
            X = X - 7;
            System.out.print(X);
        }
    }
}