找回密码
 加入
搜索
查看: 1325|回复: 3

[AU3基础] 为什么会出现语法错误?(已解决)

[复制链接]
发表于 2012-9-24 11:15:25 | 显示全部楼层 |阅读模式
本帖最后由 32714107 于 2013-4-29 22:44 编辑
Local $i, $n, $r
$n = InputBox("Input", "To what number do you want to add up?")
$r = 0
$i = 0
Do $i = $i + 1
        $r = $r + $i
Until $i >= $n
MsgBox(0, "Output", "The sum from 1 to " & $n & " is " & $r)
发表于 2012-9-24 11:30:24 | 显示全部楼层
Local $i, $n, $r
$n = InputBox("Input", "To what number do you want to add up?")
$r = 0
$i = 0
Do 
        $i = $i + 1
        $r = $r + $i
Until $i >= $n
MsgBox(0, "Output", "The sum from 1 to " & $n & " is " & $r)
发表于 2012-9-24 11:31:26 | 显示全部楼层
回复 1# 32714107


   请注意DO--until的用法格式~~
 楼主| 发表于 2012-9-24 12:14:47 | 显示全部楼层
谢谢annybaby 前辈!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-11-15 13:01 , Processed in 0.072863 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表