提示if声明,必须有then
但我有写啊
131738 的代码,确实可以运行
哦,明白了,原来是连接符号!汗!感谢131738和xrbenbeba
Dim $ten,$tow,$san
Dim $s
$s=""
For $ten=1 to 20
For $tow=1 to 20
For $san=1 To 12
if $ten+$tow+$san=20
And $ten*10+$tow*20+$san*50=600 Then
$s=$s&"10元:"&$ten&"张 "
&"20元:"&$tow&"张 "
&"50元:"&$san&"张 "&@CRLF
EndIf
Next
Next
Next
MsgBox(0,"提示",$s)
成功的
Dim $ten,$tow,$san
Dim $s
$s=""
For $ten=1 to 20
For $tow=1 to 20
For $san=1 To 12
if $ten+$tow+$san=20 _
And $ten*10+$tow*20+$san*50=600 Then $s=$s&"10元:"& $ten &"张"&"20元:"&$tow&"张"&"50元:"&$san&"张"&@CRLF
Next
Next
Next
MsgBox(0,"提示",$s)
[ 本帖最后由 yjiawfn 于 2009-3-6 20:10 编辑 ] |