本文介绍了帮助这个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

选择案例输入> = 10000和输入< = 99999
情况也是一样的
中的一个=输入\ 1000个国防部10
tenthousands =输入\ 10000
百位=输入\ 100 Mod 10
十位=输入\ 10 Mod 10
ones =输入Mod 10000 Mod 10
青少年=输入Mod 100
firstteens =输入\ 1000

选择案例数万美元

案例1
outTenthousands =" Ten"
案例2
outTenthousands =" Twenty"
案例3
outTnthousands ="Thirty"
案例4
outTenthousands =" Fourty"
案例5
outTousandousands =" Fifty"
案例6
outTousandousands =" Sixty"
案例7
outTousandousands ="七十"
案例8
outTenthousands =" Eighty"
案例9
outTousandousands =" Ninety"
结束选择
选择案例
案例1
outOnes =" One"
案例2
outOnes =" Two"
案例3
outOnes =" Three"
案例4
outOnes =" Four"
案例5
outOnes =" Five"
案例6
outOnes =" Six"
案例7
outOnes =" Seven"
案例8
outOnes =" Eight"
案例9
outOnes =" Nine"
结束选择
选择案例青少年
案例11
outOnes =" Eleven"
案例12
outOnes ="十二"
案例13
outOnes ="十三"
案例14
outOnes ="十四""
案例15
outOnes =" Fifteen"
案例16
outOnes ="十六"
案例17
outOnes =" Seventeen"
案例18
outOnes =""18"
案例19
outOnes =" Nineteen"
结束选择
选择案例数百

案例1
outHundreds ="百分之一
案例2
outHundreds ="200"
案例3
outHundreds ="三百"
案例4
outHundreds ="四百"
案例5
outHundreds ="五百"
案例6
outHundreds ="六百"
案例7
outHundreds ="七百"
案例8
outHundreds =" Eight's
案例9
outHundreds ="九百"
结束选择
选择案例数
案例2
outTens =" Twenty"
案例3
outTens ="三十"
案例4
outTens =" Fourty"
案例5
outTens =" Fifty"
案例6
outTens ="六十"
案例7
outTens ="七十"
案例8
outTens =" Eighty"
案例9
outTens =" Ninety"
结束选择
选择案例一
案例1
outOne =" One"
案例2
outOne =" Two"
案例3
outOne ="三"
案例4
outOne =" Four"
案例5
outOne =" Five"
案例6
outOne =" Six"
案例7
outOne =" Seven"
案例8
outOne =" Eight"
案例9
outOne =" Nine"

结束选择
Select Case firstteens
Case 11
outOne =" Eleven"
案例12
outOne ="十二"
案例13
outOne ="十三"
案例14
outOne ="十四"
案例15
outOne =" Fifteen"
案例16
outOne ="十六"
案例17
outOne =" Seventeen"
案例18
outOne ="十八"
案例19
outOne =" Nineteen"
案例20
outOne =" Twenty"
结束选择
选择案例actualInput> 0
Case True
lblOutput.Text = outTousandousands& " " &安培; outOne& "千千万万&安培; outHundreds& " " &安培; outTens& " " &安培; outOnes
Case False
lblOutput.Text =" Negative" &安培; outTousandousands& " " &安培; outOne& "千千万万&安培; outHundreds& " " &安培; outTens& " " &安培; outOnes
结束选择
结束选择

如果我输入15014它输出"十15000 14"&NBSP;

解决方案


Select Case input >= 10000 And input <= 99999
            Case True
                one = input \ 1000 Mod 10
                tenthousands = input \ 10000
                hundreds = input \ 100 Mod 10
                tens = input \ 10 Mod 10
                ones = input Mod 10000 Mod 10
                teens = input Mod 100
                firstteens = input \ 1000

                Select Case tenthousands

                    Case 1
                        outTenthousands = "Ten"
                    Case 2
                        outTenthousands = "Twenty"
                    Case 3
                        outTenthousands = "Thirty"
                    Case 4
                        outTenthousands = "Fourty"
                    Case 5
                        outTenthousands = "Fifty"
                    Case 6
                        outTenthousands = "Sixty"
                    Case 7
                        outTenthousands = "Seventy"
                    Case 8
                        outTenthousands = "Eighty"
                    Case 9
                        outTenthousands = "Ninety"
                End Select
                Select Case ones
                    Case 1
                        outOnes = "One"
                    Case 2
                        outOnes = "Two"
                    Case 3
                        outOnes = "Three"
                    Case 4
                        outOnes = "Four"
                    Case 5
                        outOnes = "Five"
                    Case 6
                        outOnes = "Six"
                    Case 7
                        outOnes = "Seven"
                    Case 8
                        outOnes = "Eight"
                    Case 9
                        outOnes = "Nine"
                End Select
                Select Case teens
                    Case 11
                        outOnes = "Eleven"
                    Case 12
                        outOnes = "Twelve"
                    Case 13
                        outOnes = "Thirteen"
                    Case 14
                        outOnes = "Fourteen"
                    Case 15
                        outOnes = "Fifteen"
                    Case 16
                        outOnes = "Sixteen"
                    Case 17
                        outOnes = "Seventeen"
                    Case 18
                        outOnes = "Eightteen"
                    Case 19
                        outOnes = "Nineteen"
                End Select
                Select Case hundreds

                    Case 1
                        outHundreds = "One hundred"
                    Case 2
                        outHundreds = "Two hundred"
                    Case 3
                        outHundreds = "Three hundred"
                    Case 4
                        outHundreds = "Four hundred"
                    Case 5
                        outHundreds = "Five hundred"
                    Case 6
                        outHundreds = "Six hundred"
                    Case 7
                        outHundreds = "Seven hundred"
                    Case 8
                        outHundreds = "Eight hundred"
                    Case 9
                        outHundreds = "Nine hundred"
                End Select
                Select Case tens
                    Case 2
                        outTens = "Twenty"
                    Case 3
                        outTens = "Thirty"
                    Case 4
                        outTens = "Fourty"
                    Case 5
                        outTens = "Fifty"
                    Case 6
                        outTens = "Sixty"
                    Case 7
                        outTens = "Seventy"
                    Case 8
                        outTens = "Eighty"
                    Case 9
                        outTens = "Ninety"
                End Select
                Select Case one
                    Case 1
                        outOne = "One"
                    Case 2
                        outOne = "Two"
                    Case 3
                        outOne = "Three"
                    Case 4
                        outOne = "Four"
                    Case 5
                        outOne = "Five"
                    Case 6
                        outOne = "Six"
                    Case 7
                        outOne = "Seven"
                    Case 8
                        outOne = "Eight"
                    Case 9
                        outOne = "Nine"

                End Select
                Select Case firstteens
                    Case 11
                        outOne = "Eleven"
                    Case 12
                        outOne = "Twelve"
                    Case 13
                        outOne = "Thirteen"
                    Case 14
                        outOne = "Fourteen"
                    Case 15
                        outOne = "Fifteen"
                    Case 16
                        outOne = "Sixteen"
                    Case 17
                        outOne = "Seventeen"
                    Case 18
                        outOne = "Eightteen"
                    Case 19
                        outOne = "Nineteen"
                    Case 20
                        outOne = "Twenty"
                End Select
                Select Case actualInput > 0
                    Case True
                        lblOutput.Text = outTenthousands & " " & outOne & " Thousand " & outHundreds & " " & outTens & " " & outOnes
                    Case False
                        lblOutput.Text = "Negative " & outTenthousands & " " & outOne & " Thousand " & outHundreds & " " & outTens & " " & outOnes
                End Select
        End Select

If i input 15,014 it outputs "Ten fifteen thousand fourteen" 

解决方案


这篇关于帮助这个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 11:33