Автор работы: Пользователь скрыл имя, 20 Июля 2015 в 13:48, курсовая работа
Калькулятор - это электронное вычислительное устройство для выполнения операций над числами или алгебраическими формулами. Мы пользуемся калькуляторами для математических вычислений. В наше время калькуляторы играют значимую роль во всех сферах жизни: начиная профессиональной, заканчивая бытовой. Калькулятор заменил ручные вычислительные устройства и приспособления счёты
В ходе тестов программы была замечена ошибка невозможен ввод с клавиатуры
Список литературы
Г. И. Светозарова. ОСНОВЫ ПРИКЛАДНОЙ ИНФОРМАТИКИ. Раздел: Описание языка Турбо-Бейсик. Справочное пособие.
Брайан Сайлер, Джефф Споттс. Использование Microsoft Visual Basic 6. Специальное издание
Интернет-энциклопедия Википедия
Интернет - сайт http://magref.ru/
Приложение
Исходный код
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
TextBox1.Clear()
Label1.Text = ""
Label2.Text = ""
Label3.Text = ""
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim sqrt As Double
sqrt = Convert.ToDouble(TextBox1.
TextBox1.Text = Convert.ToDouble(Math.Sqrt(
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Dim numb As Double
numb = Convert.ToDouble(TextBox1.
Dim nu As Double
nu = numb - numb - numb
TextBox1.Text = Convert.ToString(nu)
End Sub
Private Sub Button17_Click(sender As Object, e As EventArgs) Handles Button17.Click
TextBox1.Text = TextBox1.Text & "0"
End Sub
Private Sub Button13_Click(sender As Object, e As EventArgs) Handles Button13.Click
TextBox1.Text = TextBox1.Text & "1"
End Sub
Private Sub Button14_Click(sender As Object, e As EventArgs) Handles Button14.Click
TextBox1.Text = TextBox1.Text & "2"
End Sub
Private Sub Button15_Click(sender As Object, e As EventArgs) Handles Button15.Click
TextBox1.Text = TextBox1.Text & "3"
End Sub
Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click
TextBox1.Text = TextBox1.Text & "4"
End Sub
Private Sub Button10_Click(sender As Object, e As EventArgs) Handles Button10.Click
TextBox1.Text = TextBox1.Text & "5"
End Sub
Private Sub Button11_Click(sender As Object, e As EventArgs) Handles Button11.Click
TextBox1.Text = TextBox1.Text & "6"
End Sub
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
TextBox1.Text = TextBox1.Text & "7"
End Sub
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
TextBox1.Text = TextBox1.Text & "8"
End Sub
Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
TextBox1.Text = TextBox1.Text & "9"
End Sub
Private Sub Button18_Click(sender As Object, e As EventArgs) Handles Button18.Click
TextBox1.Text = TextBox1.Text & ","
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
Label1.Text = TextBox1.Text
Label2.Text = "+"
TextBox1.Clear()
End Sub
Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
Label1.Text = TextBox1.Text
Label2.Text = "-"
TextBox1.Clear()
End Sub
Private Sub Button12_Click(sender As Object, e As EventArgs) Handles Button12.Click
Label1.Text = TextBox1.Text
Label2.Text = "*"
TextBox1.Clear()
End Sub
Private Sub Button16_Click(sender As Object, e As EventArgs) Handles Button16.Click
Label1.Text = TextBox1.Text
Label2.Text = "/"
TextBox1.Clear()
End Sub
Private Sub Button19_Click(sender As Object, e As EventArgs) Handles Button19.Click
Label3.Text = TextBox1.Text
Dim sign As Char
sign = Label2.Text
Dim n1 As Double
n1 = Convert.ToDouble(Label1.Text)
Dim n2 As Double
n2 = Convert.ToDouble(Label3.Text)
Dim n3 As Double
Select Case (sign)
Case "+"
n3 = n1 + n2
Case "-"
n3 = n1 - n2
Case "*"
n3 = n1 * n2
Case "/"
n3 = n1 / n2
End Select
TextBox1.Text = Convert.ToString(n3)
End Sub
Private Sub Button20_Click(sender As Object, e As EventArgs) Handles Button20.Click
Dim s As Long
s = Val(TextBox1.Text)
TextBox1.Text = Math.Sin(s)
End Sub
Private Sub Button21_Click(sender As Object, e As EventArgs) Handles Button21.Click
Dim c As Long
c = Val(TextBox1.Text)
TextBox1.Text = Math.Cos(c)
End Sub
Private Sub Button22_Click(sender As Object, e As EventArgs) Handles Button22.Click
Dim t As Long
t = Val(TextBox1.Text)
TextBox1.Text = Math.Tan(t)
End Sub
Private Sub Button23_Click(sender As Object, e As EventArgs) Handles Button23.Click
Dim t As Long
t = Val(TextBox1.Text)
TextBox1.Text = 1 / (Math.Tan(t))
End Sub
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
End Sub
End Class