> 知识 >
VFP:从键盘输入一个数值型数据,找出该数据中数码最大和最小的数
人气:363 ℃ 时间:2026-06-01 00:26:16
解答

clear
input "请输入一个数:" to x
a=0
b=9
x=alltrim(str(x))
k=len(x)
for i=1 to k
m=substr(x,i,1)
n=int(val(m))
if n>a
a=n
endif
if n

推荐
猜你喜欢
© 2026 79432.Com All Rights Reserved.
电脑版|手机版