-
Notifications
You must be signed in to change notification settings - Fork 183
Completed tasks #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Completed tasks #69
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,10 @@ | ||
| const randomNumber = Math.round(Math.random() * 20); | ||
| console.log(randomNumber); | ||
|
|
||
| if (randomNumber > 5) { | ||
| for (let i = 5; i <= randomNumber; i++) { | ||
| console.log(i); | ||
| } | ||
| } else { | ||
| console.log("Wylosowana liczba jest zbyt mała, aby użyć pętli"); | ||
| } | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,15 @@ | ||
| const x = 5; | ||
| let result = 0; | ||
| let result = 0; | ||
|
|
||
| for (i = 1; i <= x; i++) { | ||
| result = result + i; | ||
| console.log(result); | ||
| } | ||
|
|
||
| // let i = 1; | ||
|
|
||
| // while (i <= x) { | ||
| // result += i; | ||
| // i++; | ||
| // console.log(result); | ||
| // } | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,9 @@ | ||
| const x = 10; | ||
| let iteration = 0; | ||
| let randomNumber = -1; | ||
| let randomNumber = -1; | ||
|
|
||
| while (randomNumber !== x) { | ||
| randomNumber = Math.round(Math.random() * x); | ||
| iteration++; | ||
| } | ||
| console.log("Pętla while została wykonana " + iteration + " razy"); | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍