-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAula0012.java
More file actions
30 lines (22 loc) · 837 Bytes
/
Aula0012.java
File metadata and controls
30 lines (22 loc) · 837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import java.util.Scanner;
public class Aula0012 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
double nota1, nota2, nota3, nota4;
System.out.println("Digite a sua nota: ");
nota1 = in.nextDouble();
System.out.println("Digite a sua 2 nota: ");
nota2 = in.nextDouble();
System.out.println("Digite a sua 3 nota: ");
nota3 = in.nextDouble();
System.out.println("Digite a sua 4 nota: ");
nota4 = in.nextDouble();
double soma = nota1 + nota2 + nota3 + nota4;
soma = soma / 4;
if(soma >= 7){
System.out.println("Você foi aprovado, a sua média foi de: " + soma );
}else{
System.out.println("Você foi reprovado, a sua média foi de: " + soma);
}
}
}