11 2012 档案

摘要:十进制转换二进制: 1 var c= 0,i = 10,k; 2 var g = new Array(); 3 4 while(i!=0) { 5 k = i%2; 6 if(k != 0) { 7 i = i-k; 8 } 9 g.unshift(k);10 i=i/2;11 }12 13 for(var kk in g) {14 document.write(g[kk])15 }二进制转换十进制: 1 var num = ... 阅读全文
posted @ 2012-11-25 19:57 fhefh 阅读(566) 评论(0) 推荐(0) 编辑