I am trying to nest a second if/else statement inside my first if/else statement in java but keep getting an error statement that says error "else without if".
if (m <= 5) {
System.out.println("BF: 0 ");
System.out.println("CF: 0");
System.out.println("U: 0");
System.out.println("T: 0");
}
else if (m > 5 <= 20) {
int b = (m / 5 * 30);
System.out.println("BF: " + b);
if (CZ = yes); {
int c = b * 2;
System.out.println("CZF : " + c);
}
else (CZ = no); {
int c = 0;
System.out.println("CZF: 0");
}
int u = 0;
System.out.println("UE: 0");
System.out.println("T: " + b + c + u );
}
Aucun commentaire:
Enregistrer un commentaire