Created
October 1, 2016 08:19
-
-
Save thaiall/ffe05455812d244027811340657fa75b to your computer and use it in GitHub Desktop.
โปรแกรมทำงานซ้อนกัน แล้วหาจำนวนรอบที่เกิดขึ้นทั้งหมด ด้วย javascript
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
<script> | |
var cnt = 0; | |
for(var i = 1; i <= 3; i++) | |
for(var j = 1; j <= i; j++) { | |
cnt=cnt + 1; | |
document.write(j + "<br>"); | |
} | |
document.write("output="+cnt); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment