Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
C# Community
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
VB.NET
VB.NET General Discussion
Noob Math Solving Problem..
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="deathspawner, post: 4524, member: 1889"] Have this problem to solve in an exam, but no matter how much I try, I cannot figure it out. Here is a code snippet [code] If radStraight.Checked Then Dim frmStr As String = "{0, -10} {1,12} {2,14} {3,12}" Dim x As Integer = 0 Deprec = (1 / Life) * Cost For i = 0 To Life - 1 Line = ((Year + i) & (Cost - TotalDeprec) & Deprec & (TotalDeprec + Deprec)) lstSchedule.Items.Add(String.Format(frmStr, "test", "test", "test", "test")) lstSchedule.Items.Add(String.Format(frmStr, Year + i, Year + i, Year + i, Year + i)) lstSchedule.Items.Add(String.Format(frmStr, (x), (Cost - TotalDeprec), (Cost - TotalDeprec), (Cost - TotalDeprec))) lstSchedule.Items.Add(String.Format(frmStr, Deprec, Deprec, Deprec, Deprec)) lstSchedule.Items.Add(String.Format(frmStr, TotalDeprec = TotalDeprec + Deprec, TotalDeprec = TotalDeprec + Deprec, TotalDeprec = TotalDeprec + Deprec, TotalDeprec = TotalDeprec + Deprec)) Next i[/code] I am sure you could tell what's going on through the code.. but the problem is.. it will spit out the values all the same. It won't work the way it's supposed to. It's supposed to depreciate the value of owing over time, but it's not carrying over the values as I'd like. Also, for some values, it spits out a False.. and I can't figure that out. Sorry if I left out some details, please let me know what I forgot to mention. Thanks for any help! [/QUOTE]
Insert quotes…
Verification
Post reply
VB.NET
VB.NET General Discussion
Noob Math Solving Problem..
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top
Bottom