Skip to content

Commit e94078c

Browse files
bai1/bai2
1 parent 9e6ce33 commit e94078c

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

thanhhoang/bai1.js

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// const c = new Array();
2+
// function inso(a,b) {
3+
// var i,j=0;
4+
// for(i=a;i<=b;i++) {
5+
// c[j] = i;
6+
// j++;
7+
// }
8+
// console.log(c);
9+
// }
10+
// inso(1,10);
11+
12+
// const h = ["Lưu","Thanh","Hoàng"];
13+
// console.log(h[2]);
14+
15+
function tong10(n) {
16+
var i,j,k;
17+
for(i=0;i<=n;i++) {
18+
for(j=0;j<=n;j++) {
19+
k=n-(i+j);
20+
if(k>=0) console.log(i,j,k);
21+
}
22+
}
23+
}
24+
tong10(10);
25+
26+
module.exports = {
27+
tong10
28+
}

thanhhoang/bai2.js

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
const {tong10} = require("./bai1.js")
2+
tong10(10);

0 commit comments

Comments
 (0)