Got to write a program to display when the world population was below 6million. This is what I got so far:
Private Sub btnCalculate_Click(sender As Object, e As EventArgs) Handles btnCalculate.Click
Dim year As Double = 1959
Dim totalPop As Double
Do
totalPop = totalPop / 2
year = -40
Loop Until totalPop <= 6000000
lblAnswer.Text = "Using the current growth rate," & vbCrLf & "the world population" & vbCrLf & "would have less than" & vbCrLf & "6million in the year" & year
End Sub
End Class
It keeps displaying the year 1959.
Also got to write a program to display the temp conversion chart, but for some reason they both start at 0 and go on at 5 increments (which it's supposed to) but is off because the 0s match up. Not 0c and 32f like it should be.
Private Sub btnCreate_Click(sender As Object, e As EventArgs) Handles btnCreate.Click
Dim Fahrenheit As Decimal
Dim Celsius As Decimal
Do Until Celsius = 100
lblChart.Text += Celsius.ToString & " " & Fahrenheit.ToString & vbNewLine
Fahrenheit = (9 / 5) * Celsius + 32
Celsius = +5
Loop
End Sub
End Class
Private Sub btnCalculate_Click(sender As Object, e As EventArgs) Handles btnCalculate.Click
Dim year As Double = 1959
Dim totalPop As Double
Do
totalPop = totalPop / 2
year = -40
Loop Until totalPop <= 6000000
lblAnswer.Text = "Using the current growth rate," & vbCrLf & "the world population" & vbCrLf & "would have less than" & vbCrLf & "6million in the year" & year
End Sub
End Class
It keeps displaying the year 1959.
Also got to write a program to display the temp conversion chart, but for some reason they both start at 0 and go on at 5 increments (which it's supposed to) but is off because the 0s match up. Not 0c and 32f like it should be.
Private Sub btnCreate_Click(sender As Object, e As EventArgs) Handles btnCreate.Click
Dim Fahrenheit As Decimal
Dim Celsius As Decimal
Do Until Celsius = 100
lblChart.Text += Celsius.ToString & " " & Fahrenheit.ToString & vbNewLine
Fahrenheit = (9 / 5) * Celsius + 32
Celsius = +5
Loop
End Sub
End Class