[問題] 用for迴圈做星號金字塔
這學期修電腦flash(用actionscript3.0)
老師上課教了九九乘法表
語法如下:
var str,i,j;
str=" ";
for(i=1;i<10;i++){
for(j=1;j<10;j++){
str=str+i+"*"+j+"="+i*j+"\t";
}
trace(str);
str=" ";
}
就會跑出一個九九乘法表,
但是他出了一個作業算期末成績...
要我們用for迴圈做出星
號的正三角形金字塔如下:
*
* *
* * *
* * * *
我試了好久都弄不出來,
網路上找不到都是用VB或JAVA弄出來的語法,
想請各位大大幫忙~!!!
感激不盡~!!!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 118.169.179.237
推
06/15 00:22, , 1F
06/15 00:22, 1F
→
06/15 00:22, , 2F
06/15 00:22, 2F
→
06/15 00:23, , 3F
06/15 00:23, 3F
→
06/15 00:23, , 4F
06/15 00:23, 4F
→
06/15 00:23, , 5F
06/15 00:23, 5F
→
06/15 00:51, , 6F
06/15 00:51, 6F
→
06/15 00:52, , 7F
06/15 00:52, 7F
→
06/15 01:11, , 8F
06/15 01:11, 8F
推
06/15 01:28, , 9F
06/15 01:28, 9F
推
06/15 01:29, , 10F
06/15 01:29, 10F
推
06/15 01:38, , 11F
06/15 01:38, 11F
推
06/15 08:34, , 12F
06/15 08:34, 12F
推
06/15 10:28, , 13F
06/15 10:28, 13F
→
06/15 10:29, , 14F
06/15 10:29, 14F
推
06/15 10:59, , 15F
06/15 10:59, 15F
推
06/15 12:27, , 16F
06/15 12:27, 16F
→
06/15 12:28, , 17F
06/15 12:28, 17F
→
06/15 12:29, , 18F
06/15 12:29, 18F
→
06/15 12:30, , 19F
06/15 12:30, 19F
→
06/15 12:39, , 20F
06/15 12:39, 20F
推
06/15 12:50, , 21F
06/15 12:50, 21F
→
06/15 12:51, , 22F
06/15 12:51, 22F
→
06/15 12:51, , 23F
06/15 12:51, 23F
→
06/15 12:52, , 24F
06/15 12:52, 24F
→
06/15 12:52, , 25F
06/15 12:52, 25F
→
06/15 12:57, , 26F
06/15 12:57, 26F
→
06/15 13:03, , 27F
06/15 13:03, 27F
推
06/15 13:24, , 28F
06/15 13:24, 28F
推
06/15 13:27, , 29F
06/15 13:27, 29F
推
06/15 16:38, , 30F
06/15 16:38, 30F
→
06/15 17:27, , 31F
06/15 17:27, 31F
推
06/15 17:41, , 32F
06/15 17:41, 32F
推
06/15 18:13, , 33F
06/15 18:13, 33F
→
06/15 18:17, , 34F
06/15 18:17, 34F
→
06/15 18:18, , 35F
06/15 18:18, 35F
→
06/15 18:21, , 36F
06/15 18:21, 36F
→
06/15 18:21, , 37F
06/15 18:21, 37F
→
06/15 18:22, , 38F
06/15 18:22, 38F
→
06/15 18:22, , 39F
06/15 18:22, 39F
→
06/15 18:24, , 40F
06/15 18:24, 40F
→
06/15 18:36, , 41F
06/15 18:36, 41F
推
06/15 19:10, , 42F
06/15 19:10, 42F
→
06/15 20:07, , 43F
06/15 20:07, 43F
→
06/15 20:12, , 44F
06/15 20:12, 44F
→
06/15 20:12, , 45F
06/15 20:12, 45F
→
06/15 20:17, , 46F
06/15 20:17, 46F
→
06/15 20:17, , 47F
06/15 20:17, 47F
→
06/16 00:14, , 48F
06/16 00:14, 48F
Flash 近期熱門文章
PTT數位生活區 即時熱門文章