唔。。第一个能看的程序。。嘿嘿~
var theText:String = "";
var theNum:Array = ["一","二","三","四","五","六","七","八","九","十"];
for(var i:uint = 1; i<10; i++){
for(var j:uint = 1; j<=i; j++){
var _result:String;
if(i*j<10){
_result = "得"+theNum[i*j-1];
}else if(i*j == 10){
_result = "一十";
}else if(i*j<20){
_result = "十"+theNum[i*j%10-1];
}else if(i*j%10 == 0){
_result = theNum[Math.floor(i*j/10)-1]+"十";
}else{
_result = theNum[Math.floor(i*j/10)-1]+"十"+theNum[i*j%10-1];
}
theText += theNum[j-1]+theNum[i-1]+_result+"\t";
}
theText += "\n";
}
YM.text = theText;

712

被折叠的 条评论
为什么被折叠?



