Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class TrainTheTrainers {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int juryCount = Integer.parseInt(scanner.nextLine()),
- counter = 0;
- double totalScores = 0;
- String presentation = "";
- while (!(presentation = scanner.nextLine()).equals("Finish")) {
- double score, sumScores = 0;
- for (int i = 0; i < juryCount; i++) {
- score = Double.parseDouble(scanner.nextLine());
- sumScores += score;
- }
- System.out.printf("%s - %.2f.\n", presentation, sumScores / juryCount);
- totalScores += sumScores;
- counter++;
- }
- System.out.printf("Student's final assessment is %.2f.\n", totalScores / (counter * juryCount));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement