Advertisement
Guest User

Untitled

a guest
Sep 17th, 2014
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. public class MaxDouble
  2. {
  3. public static void main( String[] args )
  4. {
  5. double[] runa = StdIn.readAllDoubles();
  6. // HÉR VANTAR MEIRI FORRITSTEXTA
  7. double max = runa[0];
  8. for(int i = 1; i < runa.length; i++)
  9. {
  10. if(runa[i]>runa[i-1])
  11. max = runa[i];
  12. }
  13. System.out.println(max);
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement