Chudo6

Babeeva Julia-01.05.22-Зірочки

May 1st, 2022
887
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //https://shpp.gitbook.io/zero/tutorials/loops/stars#chastina-3
  2. //частина 1
  3. let a = 0;
  4. while (a < 10) {
  5.     console.put("*");
  6.     a++;
  7. }
  8. console.log()
  9. //частина 2
  10. a = 0;
  11. while (a < 100) {
  12.     console.put("*");
  13.     a++;
  14. }
  15. //частина 3
  16. console.log()
  17. a = 0;
  18. let z = +prompt("Введіть кількість зірочок");
  19. while (a < z) {
  20.     console.put("*");
  21.     a++;
  22. }
  23. //частина 4
  24. console.log()
  25. for (a = 0; a < z; a++) {
  26.     console.put("*");
  27. }
  28. //частина 5
  29. console.log()
  30. a = 0;
  31. while (a < 1000) {
  32.     console.put("**********");
  33.     a++;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment