Advertisement
Guest User

Untitled

a guest
Sep 17th, 2014
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.86 KB | None | 0 0
  1.         int na, sa, eu, as, af, au, an;
  2.        
  3.         na = locator.timeTo(Continent.N_AMERICA);
  4.         sa = locator.timeTo(Continent.S_AMERICA);
  5.         eu = locator.timeTo(Continent.EUROPE);
  6.         af = locator.timeTo(Continent.AFRICA);
  7.         as = locator.timeTo(Continent.ASIA);
  8.         au = locator.timeTo(Continent.AUSTRALIA);
  9.         an = locator.timeTo(Continent.ANTARCTICA);
  10.        
  11.         if (na < sa && na < eu && na < af && na < as && na < au && na < an)
  12.             return "North America";
  13.         else if (sa < eu && sa < af && sa < as && sa <au && sa < an)
  14.             return "South America";
  15.         else if (eu < af && eu < as && eu < au && eu < an)
  16.             return "Europe";
  17.         else if (af < as && af < au && af < an)
  18.             return "Africa";
  19.         else if (as < au && au < an)
  20.             return "Asia";
  21.         else if (au < an)
  22.             return "Australia";
  23.         else
  24.             return "Antarctica";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement