Skip to content

Commit

Permalink
Merge pull request harshilp24#18 from allegium/allegium-patch-2
Browse files Browse the repository at this point in the history
A program about divide a number
  • Loading branch information
harshilp24 authored Oct 15, 2020
2 parents bab7ed9 + 1156fbb commit 1b4a20b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions JavaScript/divide_1000.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//it divides the n into 2 parts untill it's less 50. At the end you've got the number that's left and the number of iteration.
let n = 1000
let numbl = 0
do {
numbl++
n/=2
}
while (n>50)
console.log (n, numbl, 'циклов')

2 changes: 2 additions & 0 deletions JavaScript/hello_world.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const a = 'Hello, World';
console.log (a);

0 comments on commit 1b4a20b

Please sign in to comment.