Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
70 views1 page

VB Programming Exercises Guide

The document provides instructions for writing 4 Visual Basic programs: 1) To receive student marks and output their grade. 2) To calculate the circumference and area of a circle given its radius. 3) To calculate the area of a rectangle given its length and width. 4) To multiply two numbers input by the user and output a congratulatory message. For each program, it specifies the required inputs, calculations, outputs, and includes an empty button click event handler template to fill in.

Uploaded by

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

VB Programming Exercises Guide

The document provides instructions for writing 4 Visual Basic programs: 1) To receive student marks and output their grade. 2) To calculate the circumference and area of a circle given its radius. 3) To calculate the area of a rectangle given its length and width. 4) To multiply two numbers input by the user and output a congratulatory message. For each program, it specifies the required inputs, calculations, outputs, and includes an empty button click event handler template to fill in.

Uploaded by

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

Exercise : Complete Programming

1. Write a complete VB Coding to receive the marks obtained by a student and to


declare his grade according to the following rules. The grade must appear in a
message box. Range of Type of
80 and
Marks above A
grade
60 to 79 B
50 to 59 C
40 to 49 D
Below 40 Fail

Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles checkbutton.Click
.............................................................
..............................................................
End Sub

2. Write a complete VB Coding about how to calculate the circumference of circle


and the area of circle. The radius data should be requested by the user.
(Assume that 𝜋=3.142).Some images will appear when the calculate button is
“clicked.

Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles calculatebutton.Click
...............................................
...............................................
End Sub

3. Write a complete VB Coding about how to calculate the area of rectangle. The
radius data should requested from user. Use the appropriate variable to declare the
area. Some images will appear when the calculate button is “clicked.
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles calculatebutton.Click
...............................................
...............................................
End Sub

4. Write a complete VB Coding about how to times two numbers. The numbers
should requested from user. Use the appropriate variable. Some message box
congratulation will appear with the name "calculator program" when the calculate
button is clicked.

Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles calculatebutton.Click
...............................................
...............................................
End Sub

You might also like