随机产生一个4位正整数,求出该数的倒序数,输出该数及倒序数.如为1234,则倒序为4321.完成以下代码.dim x as integer,s as string,d as stringrandomizex = int(________________)s = int______________(x)d = right(s,1) +_______
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/27 05:02:56
随机产生一个4位正整数,求出该数的倒序数,输出该数及倒序数.如为1234,则倒序为4321.完成以下代码.dim x as integer,s as string,d as stringrandomizex = int(________________)s = int______________(x)d = right(s,1) +_______
随机产生一个4位正整数,求出该数的倒序数,输出该数及倒序数.如为1234,则倒序为4321.完成以下代码.
dim x as integer,s as string,d as string
randomize
x = int(________________)
s = int______________(x)
d = right(s,1) +_____________
show
print "产生的数:"; x,"倒序数:"; d
end sub
随机产生一个4位正整数,求出该数的倒序数,输出该数及倒序数.如为1234,则倒序为4321.完成以下代码.dim x as integer,s as string,d as stringrandomizex = int(________________)s = int______________(x)d = right(s,1) +_______
Dim x As Integer,s As String,d As String
Randomize
x = Int(Rnd() * 9000 + 1000)
s = Str(x)
d = Right(s,1) + Mid(s,4,1) + Mid(s,3,1) + Mid(s,2,1)
Show
Print "产生的数:"; x,"倒序数:"; d