Diameter of a circle

I need help with this project, that calculate the diameter(in miles) of a circule needed for all people of the earth to satand side by side( figure each person stands on 2 square feet on the average).The formula for Area of circle is (area = (pi)(r^2)) and that there are 5280 feet in a mile.

on the form i have only one textbox for # OF PEOPLE:

here is my code so far...
const Pi as decimal = 3.141593D
Dim Radius , area as decimal
dim isConverted as boolean

isconverted = decimal.tryparse(txtpeople.text,radius)
area = pi*radius *radius
Here is my problem the above formula give the Area I dont need the area I need the Diameter, so
Diameter = R*2/5280 ?.......
Please help...

[758 byte] By [Panaboy] at [2008-1-10]
# 1

This is not a VB question, really, it's a math question.

Let r = the radius of a circle

Let Ac = pi * (r ^ 2), the area of a circle

Let Ap = 2x, the area occupied by x persons

The diameter = 2r

Ap = Ac

2 * x = pi * (r ^ 2)

2 * x / pi = r ^ 2

Math.Sqrt(2 * x / Math.PI) = r

diameter = 2 * Math.Sqrt(2 * x / Math.PI) / 5280

It's a disappointingly small area for 7 billion people, we could get that in Chicago EASY.

AnthonyD.Green at 2007-10-3 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2
Homework question? You need the circumference of a circle, Math.Pi * radius * 2.
nobugz at 2007-10-3 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 3

Hi, I hope this helps:

Code Snippet

Dim lNumberOfPeople As Long = 15

Const PERSONAL_AREA As Integer = 2 ' 2 square feet

Const FEET_IN_MILE As Integer = 5280

Dim sngAreaTakenByPeople As Single = _

lNumberOfPeople * PERSONAL_AREA

Dim sngMinimumRadius As Single = _

CSng(Math.Sqrt(sngAreaTakenByPeople / Math.PI))

Dim sngMinimumDiameter As Single = sngMinimumRadius * 2

Debug.Print("Area: {0} sq. ft. {1} sq. mi.", _

sngAreaTakenByPeople, sngAreaTakenByPeople / FEET_IN_MILE)

Debug.Print("Min. Diameter: {0} ft. {1} mi.", _

sngMinimumDiameter, sngMinimumDiameter / FEET_IN_MILE)

JamesA.Gayhart at 2007-10-3 > top of Msdn Tech,Visual Basic,Visual Basic General...