Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

For Section 6.1 Exercuse 32 This is the code I wrote, but when I run the program

ID: 3881623 • Letter: F

Question

For Section 6.1 Exercuse 32 This is the code I wrote, but when I run the program nothing happens. Can someone verify where I've made a mistake please.

Private Sub btnPopulationGrowth_TextChanged(sender As Object, e As EventArgs) Handles btnPopulationGrowth.TextChanged

Dim year As Integer = 2011

Dim population As Double = 7.0

Do While population <= 8

population = population +

population * (1.10 / 100)

year = year() + 1

Loop

txtPopulationGrowth.Text = "World Population" & "will groth to 8 Billion in" & year.ToString() & "."

End Sub

End Class

Explanation / Answer

Private Sub btnPopulationGrowth_TextChanged(sender As Object, e As EventArgs) Handles btnPopulationGrowth.TextChanged

Dim year As Integer = 2011

Dim population As Double = 7.0

Do While population <= 8

population = population +

population * (1.10 / 100)

year = year + 1 // year is not function

Loop

txtPopulationGrowth.Text = "World Population" & "will groth to 8 Billion in" & year.ToString() & "."

End Sub

End Class

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote