Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- var startHours, checkHours, bonusPoints int
- fmt.Scanln(&startHours)
- fmt.Scanln(&checkHours)
- fmt.Scanln(&checkMinutes)
- var dayOfWeek string
- fmt.Scanln(&)
- if checkHours < startHours && checkHours <= (startHours - 1) {
- bonusPoints = 1.5
- } else if checkHours == startHours && checkMinutes <= 30 {
- bonusPoints = 1
- } else if (checkHours == startHours && checkMinutes > 30) || checkHours <= (startHours + 4) {
- bonusPoints = 0.5
- }
- if dayOfWeek == "Monday" || dayOfWeek == "Wednesday" || dayOfWeek == "Friday" {
- bonusPoints += 0.6
- } else if dayOfWeek == "Tuesday" || dayOfWeek == "Thursday" || dayOfWeek == "Saturday" {
- bonusPoints += 0.8
- } else {
- bonusPoints += 2
- }
- fmt.Printf("%.2f\n", bonusPoints)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement