Advertisement
SensaBG

Untitled

Jul 23rd, 2024
14
-1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 1
  1. for (int i = 1; i <= amountDays; i++) {
  2. int dogFood = Integer.parseInt(scanner.nextLine());
  3. int catFood = Integer.parseInt(scanner.nextLine());
  4.  
  5. dogFoodEaten += dogFood;
  6. catFoodEaten += catFood;
  7.  
  8. if(i % 3 ==0){
  9. biscuits += (dogFood + catFood) * 0.10;
  10. }
  11. }
  12.  
  13. totalFoodEaten = (dogFoodEaten + catFoodEaten) / totalFood;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement