Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- var hour, minute int
- fmt.Scanln(&hour)
- fmt.Scanln(&minute)
- var totalMinutes = hour * 60 + minute + 15
- var hours = totalMinutes / 60 % 24
- var minutes = totalMinutes % 60
- fmt.Printf("%d:%02d\n", hours, minutes)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement