Created
April 25, 2018 07:41
-
-
Save olvrb/fbf108f827666425005e3afd3b3b9b08 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nestedloo:for(y=1; y<200;y++){const fall1=Math.floor(456*x+(y>100?2.4*y:0));const fall2=Math.floor(345*x+1.5*y);if(fall1 < fall2){console.log(`${x}, ${y}`); break nestedloo;}console.log(`fall 1: 456*${x} + ${(y>100?2.4*y:0)} = ${fall1}`);console.log(`fall 2: ${fall2}`)} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment