Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //let x = 2;
- // x--;//x=x-1
- // ++x;
- // x++;
- //let y = ++x +4;
- // console.log(x);
- // console.log(y);
- //console.log(2**10);
- //////////////////////////////
- // let x = 10;
- // if(x>15 && x<25){
- // console.log("Гулять")
- // }
- // else {
- // console.log("Сериал")
- // }
- //////////////////////////////
- // let x = 6;
- // if(x==5 || x==6){
- // console.log("Win")
- // }
- // else {
- // console.log("Loose")
- // }
- //////////////////////////////
- // let x = 10;
- // if(!(x<0)){
- // console.log("+")
- // }
- // else {
- // console.log("-")
- // }
- //////////////////////////////
- // let x = -10;
- // if(x>0)
- // console.log("+")
- // else if(x<0)
- // console.log("-")
- // else(x==0)
- // console.log("0")
- ///////////////////////////////////////////////
- // let age = 10;
- // let result = (age>=14)?true:false;
- // // if(age>=14){
- // // result = true;
- // // }
- // // else{
- // // result = false;
- // // }
- // console.log(result);
- ///////////////////////////////////////////////
- // let x = 10;
- // let i =10;
- // while(i<10){
- // console.log("hello");
- // i++;
- // }
- // console.log(i);
- // let x = 10;
- // let i =10;
- // do {
- // console.log("hello");
- // i++;
- // } while(i<10);
- // let x = 10;
- // for(let i =0;i<10;i++){
- // console.log("hello");
- // }
- // console.log(i);
- ///////////////////////////////////////
- let sum = 0;
- let numbers = 0;
- while(true){
- x = Math.floor(Math.random()*102);
- // if(x>80){
- // break;
- // }
- if(x>100){
- console.error("error")
- continue;
- }
- numbers++;
- sum = sum + x;
- if(numbers>1000){
- break;
- }
- }
- console.log(numbers);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement