• 数字排序


    strA="152648937"
    WScript.Echo reversestr(strA)
    Function reversestr(strT)
        Set regEx=NewRegExp
        regex.Pattern="d"
        regex.Global=True
        regex.IgnoreCase=True
        For i=0ToLen(strT)-1
            singlestr = Mid(strT,i+1,1)
            str=str & singlestr & ","
            Set exeStr = regex.Execute(singlestr)
            If regex.Test(singlestr)=FalseThen
                WScript.Echo "不是数字!"
                WScript.Quit
            EndIf
        Next
        strArr=Split(str,",")
        For i=0ToUBound(strArr)
            For j=0ToUBound(strArr)
                If strArr(i)>strArr(j) Then
                    t=strArr(i)
                    strArr(i)=strArr(j)
                    strArr(j)=t
                EndIf
            Next
        Next
        reversestr=Join(strArr,"")
    EndFunction

  • 相关阅读:
    5道趣味Python热身题【新手必学】
    操作系统特征
    二叉树的中序遍历
    英语一图画作文模板
    函数
    双阶乘与华里士公式
    因式分解
    【】连通图——详细解释
    【】this指针——c++中的特殊指针
    咱们程序员好用的云笔记
  • 原文地址:https://www.cnblogs.com/futrueface/p/4123227.html
Copyright © 2020-2023  润新知