-
-
Save Felicio-Jessica/6bcab2e8316965dee7b5cd0a13492867 to your computer and use it in GitHub Desktop.
Média Alunos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MediaAlunos { | |
public static void main(String[] args) { | |
System.out.println("*****************************"); | |
System.out.println("MÉDIA Alunos"); | |
System.out.println("*****************************"); | |
String studentName = "Pedro"; | |
double firstGrade = 8.8; | |
double secondGrade = 9.5; | |
double thirdGrade = 7.3; | |
double fourthGrade = 9.2; | |
double finalGrade = (firstGrade + secondGrade + thirdGrade + fourthGrade) / 4; | |
System.out.println("Nota do primeiro bimestre: " + firstGrade); | |
System.out.println("Nota do segundo bimestre: " + secondGrade); | |
System.out.println("Nota do terceiro bimestre: " + thirdGrade); | |
System.out.println("Nota do quarto bimestre: " + fourthGrade); | |
System.out.println("---------------------------------------------"); | |
System.out.println(studentName + ", sua nota final é " + finalGrade); | |
System.out.println("---------------------------------------------"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment