0% found this document useful (0 votes)
2 views8 pages

C# Forms: Celsius Conversion & Growth

Reference point for students for introductory level VB.NET programming

Uploaded by

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

C# Forms: Celsius Conversion & Growth

Reference point for students for introductory level VB.NET programming

Uploaded by

2023815146
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MAIN FORM (Design)

CODING
Public Class Form3
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
[Link]
Hide()
[Link]()
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles
[Link]
Hide()
[Link]()
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles
[Link]
[Link]()
End Sub
End Class
CELSIUS TO FAHRENHEIT

CODING
Public Class Form1
Private Sub Calculate_Click(sender As Object, e As EventArgs) Handles
[Link]
Dim celsiusS As Integer
Dim celsiusE As Integer
Dim inc As Integer

If [Link]([Link], celsiusS) AndAlso


[Link]([Link], celsiusE) AndAlso
[Link]([Link], inc) AndAlso inc > 0 Then

[Link]()

For celsius As Integer = celsiusS To celsiusE Step inc


Dim fahrenheit As Double = 1.8 * celsius + 32

[Link]("C = Fahrenheit: " & [Link]("F2") & "F")


Next
Else
[Link]("Please enter valid numbers for start, end, or
increment values.", "Invalid Input", [Link],
[Link])
End If
End Sub

Private Sub ClsBtn_Click(sender As Object, e As EventArgs) Handles


[Link]
[Link]()
End Sub

Private Sub Homebtn_Click(sender As Object, e As EventArgs) Handles


[Link]
Hide()
[Link]()
End Sub
End Class
ORGANISM MULTIPLICATION

CODING
Public Class Form2
Private Sub Calculate_Click(sender As Object, e As EventArgs) Handles
[Link]
Dim startPopulation As Integer
Dim dailyIncrease As Double
Dim days As Integer

If Not [Link]([Link](),
startPopulation) Then
[Link]("Please select a valid starting population.", "Invalid
Input", [Link], [Link])
Return
End If

If Not [Link]([Link], dailyIncrease) OrElse dailyIncrease


<= 0 Then
[Link]("Please enter a valid daily population increase
percentage.", "Invalid Input", [Link], [Link])
Return
End If

If Not [Link]([Link](), days) Then


[Link]("Please select the number of days.", "Invalid Input",
[Link], [Link])
Return
End If

Dim finalPopulation As Double = startPopulation


Dim increaseRate As Double = 1 + (dailyIncrease / 100)

For day As Integer = 1 To days


finalPopulation *= increaseRate
[Link]("Day " & [Link]() & ": Population = " &
[Link]() & [Link])
Next

End Sub

Private Sub ClsBtn_Click(sender As Object, e As EventArgs) Handles


[Link]
[Link]()
End Sub
Private Sub Homebtn_Click(sender As Object, e As EventArgs) Handles
[Link]
Hide()
[Link]()
End Sub
End Class
SAMPLE OUTPUT
MAIN FORM

You might also like