Advertisement
Guest User

Untitled

a guest
Apr 8th, 2019
492
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4.  
  5. public static void main(String[] args) {
  6.  
  7. Scanner userInput = new Scanner(System.in);
  8.  
  9. int humanYears = Integer.parseInt(userInput.nextLine());
  10. int dogYears = 0;
  11.  
  12. if (humanYears >= 1 && humanYears <= 15) {
  13.  
  14. dogYears = humanYears * 7;
  15.  
  16. // if (humanYears < 2) {
  17. // dogYears = humanYears * 10;
  18. // } else {
  19. // dogYears = humanYears * 4;
  20. //
  21. // }
  22. System.out.println(dogYears);
  23. }
  24.  
  25.  
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement