Created
February 17, 2016 12:16
-
-
Save alexejVasko/32f20c79efca34b70795 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package logic; | |
public class If { | |
public static void main(String[] args) { | |
System.out.print("Esche ne rodilsya(-4 goda) - "); | |
System.out.println(oldEnough(-4)); | |
System.out.print("5 let - "); | |
System.out.println(oldEnough(5)); | |
System.out.print("20 let - "); | |
System.out.println(oldEnough(20)); | |
System.out.print("21 god - "); | |
System.out.println(oldEnough(21)); | |
System.out.print("90 let - "); | |
System.out.println(oldEnough(90)); | |
} | |
static boolean oldEnough(int age){ | |
boolean x=false; | |
if(age >= 21){ | |
x = true; | |
} | |
return x; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment