Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class TreesMan {
- public static void main(String[] args) {
- boolean green, tree, bush, brown, red;
- green = true;
- tree = false;
- bush = true;
- red = true;
- brown = false;
- if(brown) {
- if(bush) {
- System.out.println("It's Winter");
- }
- else if(tree) {
- System.out.println("Can't tell");
- }
- } else if(green) {
- if(bush || tree) {
- System.out.println("It's spring");
- }
- } else if(red) {
- if(bush || tree) {
- System.out.println("It's fall");
- }
- } else {
- System.out.println("Can't tell");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement