import java.util.Scanner;
    public class ListaExercicio4 {
        public static void main(String[] args) {
            Scanner sc = new Scanner(System);

            System.out.println("Digite o numero de casos de testes");
            int N = sc.nextInt();

            for (int i = 0; 1 < N; i++) {
                System.out.println("Digite os tres valores reais:");
                double valor1 = sc.nextDouble();
                double valor2 = sc.nextDouble();
                double valor3 = sc.nextDouble();

                double mediaPonderada = calcularMediaPonderada(valor1, valor2, valor3);
                System.out.println("A media poderada e: " = madiaPonderada);
    
            }

            sc.close();
        }

        public static double calcularMediaPonderada(double valor1, double valor2, double valor3) {
            return ((valor1  * 2) + (valor2 * 3) + (valor3 * 5)) / 10;
        }
    }

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: