close

Module Module1 Sub Main() Dim a, b As String Console.WriteLine("輸入三位元字串") : a = Console.ReadLine() Console.WriteLine("輸入任一字串") : b = Console.ReadLine() Console.WriteLine(b Like "*a.Chars(0)*") If b Like a.Chars(0) = True And b Like a.Chars(1) = True And b Like a.Chars(2) = True Then Console.WriteLine("3個相關") ElseIf b Like a.Chars(0) = True And b Like a.Chars(1) = True Then Console.WriteLine("兩個相關") ElseIf b Like a.Chars(1) = True And b Like a.Chars(2) = True Then Console.WriteLine("兩個相關") ElseIf b Like a.Chars(0) = True And b Like a.Chars(2) = True Then Console.WriteLine("兩個相關") ElseIf b Like a.Chars(0) = True Then Console.WriteLine("1個相關") ElseIf b Like a.Chars(1) = True Then Console.WriteLine("1個相關") ElseIf b Like a.Chars(2) = True Then Console.WriteLine("1個相關") Else Console.WriteLine("0個相關") End If Console.ReadLine() End SubEnd Module


arrow
arrow
    全站熱搜
    創作者介紹
    創作者 aa 的頭像
    aa

    水仙花

    aa 發表在 痞客邦 留言(1) 人氣()