Advertisement
buzzonit

java random exercicios

Apr 29th, 2016
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. int n, mn;
  2. Scanner s=new Scanner (System.in);
  3. System.out.println("digite numero");
  4. mn = s.nextInt();
  5. for (int x = 1; x < 15; x++)
  6. {
  7. System.out.println("digite numero");
  8. n = s.nextInt();
  9.  
  10. if (n > mn)
  11. {
  12. mn = n;
  13. }
  14. }
  15. System.out.println("maior numero digita e :" + mn);
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement