Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int walkMinutes = Integer.parseInt(scanner.nextLine()),
- walksQuantity = Integer.parseInt(scanner.nextLine()),
- caloriesConsumed = Integer.parseInt(scanner.nextLine()),
- burnedCaloriesPerDay = walkMinutes * walksQuantity * 5;
- if (burnedCaloriesPerDay >= caloriesConsumed / 2) {
- System.out.printf("Yes, the walk for your cat is enough. Burned calories per day: %d.\n", burnedCaloriesPerDay);
- } else {
- System.out.printf("No, the walk for your cat is not enough. Burned calories per day: %d.\n", burnedCaloriesPerDay);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement