# what is the source code of convert length to weight

Page 1 of 1

## 2 Replies - 1355 Views - Last Post: 17 February 2009 - 07:36 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=87337&amp;s=b22cdb242d03bcd20f8f3884de874ea5&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 poison

Reputation: 0
• Posts: 1
• Joined: 17-February 09

# what is the source code of convert length to weight

Posted 17 February 2009 - 07:13 PM

what is the source code of c++ in convert to length to weight
Is This A Good Question/Topic? 0

## Replies To: what is the source code of convert length to weight

### #2 KYA

• Wubba lubba dub dub!

Reputation: 3202
• Posts: 19,232
• Joined: 14-September 07

## Re: what is the source code of convert length to weight

Posted 17 February 2009 - 07:33 PM

You'll have to figure out what the correlation is between length and weight of an object. no one here will be able to offer advice since we have no idea what it is.

This post has been edited by KYA: 17 February 2009 - 07:33 PM

### #3 KBentley57

Reputation: 0
• Posts: 19
• Joined: 01-November 08

## Re: what is the source code of convert length to weight

Posted 17 February 2009 - 07:36 PM

In order to convert the length of an object to its weight, you must know the density and the object in question and the volume. Given that you can find the volume from the length the function you need to find is:

f(l) = D * V(l)

where D is the density and V(l) is the volume of the object. Shouldn't be too hard for easy shapes, or for any analytical shape for that matter.