-4
I did not understand what the error of the code.
import java.util.Scanner;
public class Questao4 {
public static void main (String[] args){
Scanner scanner = new Scanner(System.in);
double Altura, Fixo, Fixo2, PesoIdeal, Resultado1;
Altura = 1,73; //Chute
Fixo = 72,7;
Fixo2 = 58;
Resultado1 = Altura * Fixo;
PesoIdeal = Resultado1 - Fixo2;
System.out.print("Peso Ideal = " + PesoIdeal);
}
}
When compiling, the following errors were detected:
Questao4.java:6: error: ';' expected Altura = 1,73; //Chute Questao4.java:7: error: ';' expected Fixo = 72,7;
In java. Double numbers have to be point (e.g. 1.73) and not comma (1.73)
– adventistaam
I found the negative votes exaggerated, I think the comment of @adventistaam solve the problem
– rLinhares
Before the issue, the votes are deserved yes. Reason for closure was mistaken, I think this is more typo.
– user28595