Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- var income, average, salary float64
- fmt.Scanln(&income)
- fmt.Scanln(&average)
- fmt.Scanln(&salary)
- social := salary * 0.35
- excellent := average * 25
- if average < 4.50 {
- fmt.Println("You cannot get a scholarship!")
- } else if average > 4.50 && average < 5.50 {
- if income < salary {
- fmt.Printf("You get a Social scholarship %d BGN\n", int(social))
- } else {
- fmt.Println("You cannot get a scholarship!")
- }
- } else {
- if income < salary {
- if excellent < social {
- fmt.Printf("You get a Social scholarship %d BGN\n", int(social))
- } else {
- fmt.Printf("You get a scholarship for excellent results %d BGN\n", int(excellent))
- }
- } else {
- fmt.Printf("You get a scholarship for excellent results %d BGN\n", int(excellent))
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement