Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

VS 2010 I need some help guys. Please.

$
0
0
Hello all. My name is Jennifer. I am new to this forum and to the world of programming. I am taking a intro to programming and databases at my local technical college. I feel like I am way in over my head. I have no prior experience in programming. I have an assignment the is due tonight by midnight. I believe I have all the programming correct, but I cannot get the calculations right. My output is not correct. Any help would be appreciated. Here is what I have so far...


Public Class Form1

Private Sub Done_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Done.Click
End
End Sub

Private Sub clear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles clear.Click
NSEW.Clear()
lastY.Clear()
End Sub

Private Sub calc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles calc.Click

Dim north As Integer
Dim south As Integer
Dim east As Integer
Dim west As Integer


Dim LastYearSales As Double
Dim NextYearSales As Double = 0
Dim IncreaseAmount As Double = 0

LastYearSales = Val(lastY.Text)



north = 0.05
south = 0.08
east = 0.03
west = 0.06


If NSEW.Text.ToUpper = "NORTH" Then
IncreaseAmount = north * LastYearSales
ElseIf NSEW.Text.ToUpper = "SOUTH" Then
IncreaseAmount = south * LastYearSales
ElseIf NSEW.Text.ToUpper = "EAST" Then
IncreaseAmount = east * LastYearSales
ElseIf NSEW.Text.ToUpper = "WEST" Then
IncreaseAmount = west * LastYearSales
End If



NextYearSales = IncreaseAmount + LastYearSales


lblAns.Text = NextYearSales
End Sub




End Class

Like I said, I think its a calculation error on my part. Please help me. :cry: Thank you for your time.

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>