• Language

    Visual Basic .Net

  • Description

    It converts yards and feet to inches and add them together.
    The program allows for the input of three numbers:
    yards
    feet
    inches
    Then take the yards and feet input converts them to inches and adds all three numbers together.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Module YardsFeetAndInchesToInches

    Sub Main()
        Dim feet, inches, total_inches, yards As Integer
        Console.Write("Enter the value of feet: ")
        feet = Integer.Parse(Console.ReadLine())
        Console.Write("Enter the value of inches: ")
        inches = Integer.Parse(Console.ReadLine())
        Console.Write("Enter the value of yards: ")
        yards = Integer.Parse(Console.ReadLine())
        total_inches=(yards*3+feet)*12+inches
        Console.WriteLine("Value of total inches: " & total_inches)
        Console.WriteLine()
        Shell ("cmd /c pause", AppWinStyle.NormalFocus, True)
    End Sub

End Module