- ©«¤l
- 835
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 915
- ÂI¦W
- 16
- §@·~¨t²Î
- Win 10,7
- ³nÅ骩¥»
- 2019,2013,2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2024-11-14
|
¥»©«³Ì«á¥Ñ luhpro ©ó 2021-11-26 00:26 ½s¿è
½Ð±Ð ªO¤Í «ç¥Î Âù«ªº for °j°é ¨Ó °µ¨ìµe± ªº¬P¬P ½b¼L?
adrian_9832 µoªí©ó 2021-11-24 15:23
¨ä¹ê³o¥i¥H¬Ý¦¨³æ¯Âªº¼Æ¾Çpºâ :
1. ±q¥ª¨ì¥k¦@8Äæ : iI = 1 to 8
2. :±q¤W¨ì¤U¦³¬P¸¹ªº¦C¸¹¨Ì§Ç¬°: 3 to 3, 2 to 4, 1 to 5, 3 to 3, 3 to 3.....
¬G¦Ó °_¦C ¬° 3, 2, 1, 3, 3......
¦Ó¥½¦C¬° : 3, 4, 5, 3, 3......
¥i¥H©úÅã°Ï¤À¬°4¥H¤U(¤À§O¦U¼W´î1) ¤Î 3¥H¤W(³£¬O3) ¨âӰ϶ôºâ¦¡
«h¥i¥H±o¤U¦¡ :
°_¦C :(¤U¦¡¶K¨ì§Y®É¹Bºâµøµ¡°õ¦æ¥iª¾ºâ¦¡µ²ªG)
For iI = 1 To 8: iJ = -(4 - iI) * (iI < 4) - (iI > 3) * 3: Debug.Print iI, iJ: Next
¦Ó¥½¦C«h¬° :
For iI = 1 To 8: iJ = -(2 + iI) * (iI < 4) - (iI > 3) * 3: Debug.Print iI, iJ: Next
ºî¦X¤Wz«h¥i±o :- Sub nn()
- Dim iI%, iJ%, iK%
-
- Range(Cells(1, 1), Cells(5, 8)).ClearContents ' ²M°£¬P¸¹
-
- For iI = 1 To 8
- iK = (iI > 3) * 3 ' ´î¸¹«á±ªººâ¦¡
- For iJ = -(4 - iI) * (iI < 4) - iK To -(2 + iI) * (iI < 4) - iK
- Cells(iJ, iI) = "*"
- Next iJ
- Next iI
- End Sub
½Æ»s¥N½X
Âù«forloop½Ð±Ð¦L¬P¬Pstar-a.zip (13.39 KB)
|
|