TOPIC

Qual erro? Presentation error - Java

Jhonatan asked 1 year ago

import java.util.Locale; import java.util.Scanner;

public class Main {

public static void main(String[] args) {
    Locale.setDefault(Locale.US);
    Scanner sc = new Scanner(System.in);

    double A, B, C, MEDIA;
    A = sc.nextDouble();
    B = sc.nextDouble();
    C = sc.nextDouble();

    MEDIA = (A * 2.0 + B * 3.0 + C * 5.0)/ 10.0;
    System.out.printf("MEDIA = %.1f ", MEDIA);

    sc.close();
}

}

This topic has not been answered yet. Be the first!

Remember not post solutions. Your post may be reviewed by our moderators.