Module Module1
    '関数
    Function gcd(x As Integer, y As Integer)
        Dim result As Integer

        If   ①   Then
            result =   ②  
        Else
            result =   ③  
        End If

        gcd = result
    End Function

    'メイン
    Sub Main()
        Dim x As Integer
        Dim y As Integer
        Dim ans As Integer
        Dim work As String

        Console.WriteLine("xとyを入力(x > y)")
        Console.Write("xを入力:")
        work = Console.ReadLine() '文字で入力されるので
        x = Integer.Parse(work) '整数に変換する
        Console.Write("yを入力:")
        work = Console.ReadLine() '文字で入力されるので
        y = Integer.Parse(work) '整数に変換する

        ans = gcd(x, y)

        Console.WriteLine(x & "と" & y & "の最大公約数は" & ans)

        Console.WriteLine("何かキーを押してください")
        Console.ReadKey()
    End Sub

End Module