Imports System.Console
Module Module1
Dim d
Dim e, b As String
Dim a As Integer, c As Integer
Sub Main()
WriteLine("Program Kalkulator Mini")
WriteLine("=======================")
Write("Masukkan Angka Ke-1 : ")
a = ReadLine()
Console.Write("Masukkan Operasi (+, -, /, x) : ")
b = ReadLine()
Write("Masukkan Angka Ke-2 : ")
c = ReadLine()
If b = "x" Or b = "X" Then
d = a * c
ElseIf b = "-" Then
d = a - c
ElseIf b = "+" Then
d = a + c
ElseIf b = "/" Then
d = a / c
Else
Write("Maaf Operasinya Tidak Terdaftar")
d = ReadLine()
End If
Write("Hasil :" & d)
ReadLine()
Write("Ingin Ulangi Kalkulator ? (Y/T) ")
e = ReadLine()
If e = "y" Or e = "Y" Then
Clear()
Call Main()
Else
End
End If
End Sub
0 komentar:
:a: :b: :c: :d: :e: :f: :g: :h: :i: :j: :k: :l:
Posting Komentar
Silahkan gan komentarnya,,karena komentar anda sangat berarti bagi blog ini...Salam blogger