Advertisement
Guest User

Untitled

a guest
Sep 29th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. a)
  2. Choose (A: add scores), (R: refresh scores), or (Q: quit)
  3. Input 0s and 1s in one line, and put * at the end
  4. Choose (A: add scores), (R: refresh scores), or (Q: quit)
  5. Invalid command. Try Again
  6. Choose (A: add scores), (R: refresh scores), or (Q: quit)
  7. The data is refreshed
  8. Choose (A: add scores), (R: refresh scores), or (Q: quit)
  9. *** End of Program ***
  10.  
  11. b) line 25
  12. else if (command == 'D') {
  13. System.out.printIn("Display the result");
  14. }
  15.  
  16. c)
  17. num0 counts the amount of times that 0 is entered while num1...
  18. counts the amount of times that 1 is entered. num0 should...
  19. equal 3 and num1 should equal 4 after the program is executed.
  20.  
  21. d)
  22. Choose (A: add scores), (R: refresh scores), or (Q: quit)
  23. Input 0s and 1s in one line, and put * at the end
  24. Choose (A: add scores), (R: refresh scores), or (Q: quit)
  25. Display the result
  26. Num0| ***
  27. Num1| ****
  28. Choose (A: add scores), (R: refresh scores), or (Q: quit)
  29. *** End of Program ***
  30.  
  31. e) line 20
  32. num0 = num1 = 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement