Advertisement
Spocoman

03. Train The Trainers

Sep 24th, 2024
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.70 KB | None | 0 0
  1. package main
  2.  
  3. import "fmt"
  4.  
  5. func main() {
  6.     var juryCount, presentationCount int
  7.     fmt.Scanln(&juryCount)
  8.    
  9.     var totalScores = 0.0
  10.    
  11.     var presentation = ""
  12.     fmt.Scanln(&presentation)
  13.    
  14.     for ; presentation != "Finish"; {
  15.         var score, sumScores float64
  16.         for i := 0; i < juryCount; i++ {
  17.             fmt.Scanln(&score)
  18.             sumScores += score
  19.         }
  20.         fmt.Printf("%s - %.2f.\n", presentation, sumScores / float64(juryCount))
  21.         totalScores += sumScores
  22.         presentationCount++
  23.         fmt.Scanln(&presentation)
  24.     }
  25.    
  26.     fmt.Printf("Student's final assessment is %.2f.\n", totalScores / float64(presentationCount * juryCount))
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement