0% found this document useful (0 votes)
0 views

Calculator Programme Code

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Calculator Programme Code

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Module Module1

Dim N1, N2 As Integer


Dim OPT As String
Dim RES As Double
Sub Main()
Console.Write("Enter Number 1 : ")
N1 = Console.ReadLine()
Console.Write("Enter Number 2 : ")
N2 = Console.ReadLine()
Console.WriteLine("")

Console.WriteLine("CALCULATOR ")
Console.WriteLine("-----------------")
Console.WriteLine("")
Console.WriteLine("1. Addition")
Console.WriteLine("2. Substraction")
Console.WriteLine("3. Multiplication")
Console.WriteLine("4. Divition")
Console.WriteLine("")

Console.Write("Enter your chose : ")


OPT = Console.ReadLine()

If OPT = "1" Then


RES = N1 + N2
Else
If OPT = "2" Then
RES = N1 - N2
End If
If OPT = "3" Then
RES = N1 * N2
End If
If OPT = "4" Then
RES = N1 / N2
End If
End If
Console.WriteLine("")
Console.Write("Result is: " & RES)
Console.ReadLine()
End Sub

End Module

You might also like