Advertisement
Guest User

ww

a guest
Sep 22nd, 2014
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. class Teht19
  2.  
  3. {
  4. public static void main(String[]jejjj)
  5. {
  6.  
  7.  
  8. System.out.println("syota lukuja, nolla lopettaa.");
  9. int luku = Lue.kluku();
  10. int isompi = luku;
  11. int pienempi = luku;
  12. while (luku != 0) {
  13. int isompi = Math.max(luku, isompi);
  14. int pienempi = Math.min(luku, pienempi);
  15. luku = Lue.kluku();
  16.  
  17. }
  18. System.out.println("Suurempi :" + isompi);
  19. System.out.println("Pienempi :" + pienempi);
  20.  
  21.  
  22.  
  23. }
  24.  
  25.  
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement