Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. while (true) {
  2. String kozunakRate = scanner.nextLine();
  3. if(i == kozunaci){
  4. if (kozunakRate.equals("Close")) {
  5. if(rate > winnerRate){
  6. winnerRate = rate;
  7. System.out.println(chef + rate);
  8. System.out.println(chef + "is the winner!");
  9. break;
  10. }else{
  11. System.out.println(chef + rate);
  12. System.out.println(winnerChef+ "is the winner!");
  13. break;
  14. }
  15.  
  16. }
  17.  
  18. }else {
  19. if (kozunakRate.equals("Close")) {
  20. if(rate > winnerRate){
  21. winnerRate = rate;
  22. winnerChef = chef;
  23. System.out.println(chef + "is the new number 1!");
  24. }
  25. System.out.println(chef + rate);
  26.  
  27. break;
  28. } else {
  29. int rateInteger = Integer.valueOf(kozunakRate);
  30. rate = rate + rateInteger;
  31. }}
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement