TOPIC

Tudo certo mas continua dando erro!

kneves3 asked 2 years ago

import java.io.IOException; import java.util.Scanner;

public class Main {

public static void main(String[] args) throws IOException {
    Scanner kb = new Scanner(System.in);
    System.out.println("primeiro nome do vendedor");
    String nomeVendedor = kb.next();
    double salarioFixo = kb.nextDouble();
   double valorVendido = kb.nextDouble();

   double TOTAL = (valorVendido*15)/100+ salarioFixo;
System.out.format("TOTAL = R$ %.2f\n",TOTAL);

}

}

This topic was solved and cannot recieve new replies.

  • ArtCristiano replied 2 years ago

    Faça o teste tirando a seguinte linha:

    System.out.println("primeiro nome do vendedor");

    Ela vai gerar um output diferente do que é pedido pelo problema. Deve ser por causa disso que está dando erro.