2010-04-26 - C# calculator
Dim a As Double
Dim ch As String
Private Sub Command1_Click()
Text1.Text = Text1.Text & "1"
End Sub
Private Sub Command10_Click()
Text1.Text = Text1.Text & "0"
End Sub
Private Sub Command12_Click()
Text1.Text = Text1.Text & "."
End Sub
Private Sub Command13_Click()
a = Val(Text1.Text)
ch = "/"
Text1.Text = ""
End Sub
Private Sub Command14_Click()
a = Val(Text1.Text)
ch = "*"
Text1.Text = ""
End Sub
Private Sub Command15_Click()
a = Val(Text1.Text)
ch = "-"
Text1.Text = ""
End Sub
Private Sub Command16_Click()
a = Val(Text1.Text)
ch = "+"
Text1.Text = ""
End Sub
Private Sub Command19_Click()
Text1.Text = ""
End Sub
Private Sub Command2_Click()
Text1.Text = Text1.Text & "2"
End Sub
Private Sub Command20_Click()
Select Case ch
Case "+": Text1.Text = a + Val(Text1.Text)
Case "-": Text1.Text = a - Val(Text1.Text)
Case "*": Text1.Text = a * Val(Text1.Text)
Case "/": Text1.Text = a / Val(Text1.Text)
End Select
If ch = "sqrt" Then
Text1.Text = a ^ 0.5
End If
If ch = "^" Then
Text1.Text = a ^ Val(Text1.Text)
End If
If ch = "^" Then
Text1.Text = a ^ 3
End If
End Sub
Private Sub Command21_Click()
Text1.Text = (Text1.Text) - ((Text1.Text) - (Text1.Text) 10)
End Sub
Private Sub Command24_Click()
a = Val(Text1.Text)
ch = "sqrt"
Text1.Text = ""
End Sub
Private Sub Command3_Click()
Text1.Text = Text1.Text & "3"
End Sub
Private Sub Command33_Click()
a = Val(Text1.Text)
ch = "^"
Text1.Text = ""
End Sub
Private Sub Command36_Click()
a = Val(Text1.Text)
ch = "^"
Text1.Text = ""
End Sub
Private Sub Command4_Click()
Text1.Text = Text1.Text & "4"
End Sub
Private Sub Command5_Click()
Text1.Text = Text1.Text & "5"
End Sub
Private Sub Command6_Click()
Text1.Text = Text1.Text & "6"
End Sub
Private Sub Command7_Click()
Text1.Text = Text1.Text & "7"
End Sub
Private Sub Command8_Click()
Text1.Text = Text1.Text & "8"
End Sub
Private Sub Command9_Click()
Text1.Text = Text1.Text & "9"
End Sub
Сэтгэгдлүүд
2011-10-27 -
Бичсэн: gvnjee (зочин)
ene yun calculatornii kod we? hariulj tuslaach
2010-05-08 -
Бичсэн: beegii
zaza zurgaa solitson shvv odoo xuvtsastai
2010-04-26 -
Бичсэн: Хүслийнжигүүр
Network чинь уул шугамдаа эмэгтэй л гэжийлээ шд. ккккккк