Compute Exponential Number using VB.Net
Submitted by donbermoy on Wednesday, February 19, 2014 - 16:51.
In this article, i will introduce again some function in VB.NET regarding the Math Functions, this is Math.Pow(). Math.Pow() Function in vb.net computes a number that has an exponent.It returns a specified number raised to the specified power.
So, now let's start this tutorial!
1. Let's start with creating a Windows Form Application for this tutorial by following the following steps in Microsoft Visual Studio: Go to File, click New Project, and choose Windows Application.
2. Next, add two TextBoxes named TextBox1 and TextBox2 then leave it as blank. TextBox1 will be used as an input for a number and TextBox2 will be used as an input for the exponent. Now, add a Button named Button1 to compute the exponential number. You must design your layout like this:
3. Now, put this code in Button1_Click. This will compute your exponential number.
In this code, we initialized
num1 holds the value of TextBox1 as we input it our main number, expo holds the value of TextBox2 as we declare it as our exponent, and the result variable holds the answer to the exponential number. We used the formula
Download the source code below and try it! :)
For more inquiries and need programmer for your thesis systems in any kind of programming languages, just contact my number below.
Best Regards,

- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Dim num1 As Integer, expo As Integer
- Dim result As Integer
- result = Math.Pow(num1, expo)
- MessageBox.Show(num1 & " to the power of " & expo & " is" & " " & result)
- End Sub
- Dim num1 As Integer, expo As Integer
- Dim result As Integer
Math.Pow(num1, expo)
to have the result pass through the variable result. Then it will get the answer in num1 and the expo as our exponent. Then it will display num1 & " to the power of " & expo & " is" & " " & result.
Output:

Engr. Lyndon R. Bermoy
IT Instructor/System Developer/Android Developer
Mobile: 09079373999
Telephone: 826-9296
E-mail:[email protected]
Visit and like my page on Facebook at: Bermz ISware Solutions
Subscribe at my YouTube Channel at: SerBermz
Visit and like my page on Facebook at: https://www.facebook.com/BermzISwareAdd new comment
- 1461 views