Advertisement
Guest User

Untitled

a guest
Oct 18th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. import TerminalIO.KeyboardReader;
  2.  
  3. public class AsteriskMania
  4. {
  5. public static void main(String[]args)
  6. {
  7. int numberLines = 0, i = 0, ii = 0, currentAsterisk = 0, numberOfAsterisk = 0;
  8. char yorN = ' ', asterisk = ' ';
  9.  
  10. KeyboardReader reader = new KeyboardReader();
  11. do
  12. {
  13. numberLines = reader.readInt("Please enter the number of lines you would like: ");
  14. for(i = 0; i <= numberLines; i++)
  15. {
  16. asterisk = '*';
  17. System.out.print(asterisk + "\n");
  18. asterisk = '*' + '*';
  19. }
  20. yorN = reader.readChar("Would you like to repeat the program: ");
  21. }while(yorN == 'y' || yorN == 'Y');
  22.  
  23.  
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement