Advertisement
Spocoman

Scholarship

Oct 13th, 2024
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.98 KB | None | 0 0
  1. package main
  2.  
  3. import "fmt"
  4.  
  5. func main() {
  6.     var income, average, salary float64
  7.     fmt.Scanln(&income)
  8.     fmt.Scanln(&average)
  9.     fmt.Scanln(&salary)
  10.    
  11.     social := salary * 0.35
  12.     excellent := average * 25
  13.  
  14.     if average < 4.50 {
  15.         fmt.Println("You cannot get a scholarship!")
  16.     } else if average > 4.50 && average < 5.50 {
  17.         if income < salary {
  18.             fmt.Printf("You get a Social scholarship %d BGN\n", int(social))
  19.             } else {
  20.                 fmt.Println("You cannot get a scholarship!")
  21.             }
  22.     } else {
  23.         if income < salary {
  24.             if excellent < social {
  25.                 fmt.Printf("You get a Social scholarship %d BGN\n", int(social))
  26.             } else {
  27.                 fmt.Printf("You get a scholarship for excellent results %d BGN\n", int(excellent))
  28.             }
  29.         } else {
  30.             fmt.Printf("You get a scholarship for excellent results %d BGN\n", int(excellent))
  31.         }
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement