This document describes a program that calculates the average grade of a student based on three test scores. The program accepts the scores as input in three text boxes, calculates the average by summing the scores and dividing by three, and displays the average in a fourth text box. It also includes a button to clear all the text boxes to allow for a new calculation.
This document describes a program that calculates the average grade of a student based on three test scores. The program accepts the scores as input in three text boxes, calculates the average by summing the scores and dividing by three, and displays the average in a fourth text box. It also includes a button to clear all the text boxes to allow for a new calculation.
This document describes a program that calculates the average grade of a student based on three test scores. The program accepts the scores as input in three text boxes, calculates the average by summing the scores and dividing by three, and displays the average in a fourth text box. It also includes a button to clear all the text boxes to allow for a new calculation.
PROMEDIO DE NOTAS DE UN ALUMNO QUE PRESENTA TRES NOTAS
Public Class Form1
Dim n1 As Integer Dim n2 As Integer Dim n3 As Integer Dim P As Single Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click n1 = Val(TextBox1.Text) n2 = Val(TextBox2.Text) n3 = Val(TextBox3.Text) P = (n1 + n2 + n3) / 3 TextBox4.Text = P End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click TextBox1.Text = "" TextBox2.Text = "" TextBox3.Text = "" TextBox4.Text = "" End Sub End Class