Display weight base on a age value?

Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Sep 2008
Posts: 23
Reputation: 3Dees is an unknown quantity at this point 
Solved Threads: 0
3Dees 3Dees is offline Offline
Newbie Poster

Display weight base on a age value?

 
0
  #1
Sep 12th, 2008
Hey,
i am trying to display weight base on a age input without using a table vb.net. Say a age can be anyware from 1 to 18 yrs and weight at 1 = 11kg with a avg increase of 3kg per year. I thought of using a for loop but not sure how to connect that to the age.

what method could best solve this in vb.net any suggestions?
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 148
Reputation: samir_ibrahim is on a distinguished road 
Solved Threads: 16
samir_ibrahim's Avatar
samir_ibrahim samir_ibrahim is offline Offline
Junior Poster

Re: Display weight base on a age value?

 
0
  #2
Sep 12th, 2008
  1. Dim iAge, iWeight As Integer
  2. iAge = Val(TextBox1.Text)
  3. iWeight = ((iAge - 1) * 3) + 11

hth

Samir Ibrahim
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the VB.NET Forum
Thread Tools Search this Thread



Tag cloud for VB.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC