Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. public class TreesMan {
  2.  
  3. public static void main(String[] args) {
  4. boolean green, tree, bush, brown, red;
  5. green = true;
  6. tree = false;
  7. bush = true;
  8. red = true;
  9. brown = false;
  10. if(brown) {
  11. if(bush) {
  12. System.out.println("It's Winter");
  13. }
  14. else if(tree) {
  15. System.out.println("Can't tell");
  16. }
  17. } else if(green) {
  18. if(bush || tree) {
  19. System.out.println("It's spring");
  20. }
  21. } else if(red) {
  22. if(bush || tree) {
  23. System.out.println("It's fall");
  24. }
  25. } else {
  26. System.out.println("Can't tell");
  27. }
  28.  
  29. }
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement