急,vf的题目
来源:百度知道 编辑:UC知道 时间:2024/05/15 10:19:09
由键盘输入一个字符串,要求逆序输出该字符串
clear
x=""
@1,2 say"请输入字符:" get s default space(20)
read
for i=1 to len(s)
x=substr(s,i,1)+x
endf
?x
这个程序我试过了,可行的哟!!
clear
accept "请输入一个字符串: " to a default space(20)
for b=len(a) to 1 step -1
??space(20)+substr(a,b,1)
endfor