# Factorial Solver in Visual Basic .NET

Email
 Submitted on: 4/13/2016 2:19:05 PM By: Jake R. Pomperada Level: Beginner User Rating: Unrated Compatibility: VB.NET Views: 2290

A factorial program that I wrote using Microsoft Visual Basic .NET to solve for the factorial of the number. The code is very easy to understand I create a function called factorial which uses recursion algorithm to solve the factorial of the given number by our user. Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com My mobile number here in the Philippines is 09173084360.

code:
Can't Copy and Paste this?
 ``` //************************************** // Name: Factorial Solver in Visual Basic .NET // Description:A factorial program that I wrote using Microsoft Visual Basic .NET to solve for the factorial of the number. The code is very easy to understand I create a function called factorial which uses recursion algorithm to solve the factorial of the given number by our user. Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com My mobile number here in the Philippines is 09173084360. // By: Jake R. Pomperada //************************************** Public Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Label2.Visible = False End Sub Private Function Factorial(ByVal inputval As Integer) As Integer Dim f As Integer Factorial = 1 For f = 2 To inputval Factorial = Factorial * f Next End Function Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Label2.Visible = True Dim myNumber1, mynumber2 As Integer myNumber1 = Val(TextBox1.Text) mynumber2 = Factorial(Val(TextBox1.Text)) Label2.Text = "The factorial value of " & myNumber1 & _ " is " & mynumber2 & "." End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click Label2.Visible = False TextBox1.Text = "" Label2.Text = "" Label2.Text = "" TextBox1.Focus() End Sub End Class ```

Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)