Advertisement
Spocoman

Cat Walking

Oct 4th, 2024
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.57 KB | None | 0 0
  1. package main
  2.  
  3. import "fmt"
  4.  
  5. func main() {
  6.     var walkMinutes, walksQuantity, caloriesConsumed int
  7.     fmt.Scanln(&walkMinutes)
  8.     fmt.Scanln(&walksQuantity)
  9.     fmt.Scanln(&caloriesConsumed)
  10.    
  11.     burnedCaloriesPerDay := walkMinutes * walksQuantity * 5
  12.  
  13.     if burnedCaloriesPerDay >= caloriesConsumed / 2 {
  14.         fmt.Printf("Yes, the walk for your cat is enough. Burned calories per day: %d.\n", burnedCaloriesPerDay)
  15.     } else {
  16.         fmt.Printf("No, the walk for your cat is not enough. Burned calories per day: %d.\n", burnedCaloriesPerDay)
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement