public static void main(String[] args) {
Scanner ler = new Scanner(System.in);
System.out.println("====Programa da Média====");
System.out.println("Informe a nota 1");
double n1 = ler.nextDouble();
System.out.println("Informe a nota 2");
double n2 = ler.nextDouble();
System.out.println("Informe a nota 3");
double n3 = ler.nextDouble();
double mmm = media (n1, n2, n3);
System.out.println("A média é " + mmm);
}
public static double media (double n1, double n2, double n3) {
double m = (n1+n2+n3)/3;
return m;
import java.util.Scanner;
class Main {
}
}
}