Results 1 to 6 of 6

Thread: [RESOLVED] Surface Area of a Hollow Cylinder

Threaded View

  1. #1

    Thread Starter
    Frenzied Member toecutter's Avatar
    Join Date
    Apr 2006
    Location
    Brisbane, Australia
    Posts
    1,160

    Resolved [RESOLVED] Surface Area of a Hollow Cylinder

    I have this so far
    Code:
           Dim cColumnHeightRound As Double = (40) / 1000
          
            Dim n As Double = 3.142857142 '/ 1000
            rRadius = (70) / 1000 '* 2
            Dim mM2 As Double = 0
            mM2 = (2 * n) * rRadius * cColumnHeightRound
            'mM2 = mM2 / 1000
            'mM2 = Math.Round(mM2, 3)
            Me.txtTotalM2Round.Text = mM2.ToString
    The result is 0.0175999999952 which is incorrect.

    No matter what i try i can not get it to be 0.175 which is correct i believe.

    regards
    toe

    edit
    Code:
     Dim cColumnHeightRound As Decimal = Decimal.Parse(Me.cmbColumnHeightRound.Text)
            rRadius = Decimal.Parse(Me.txtRadius.Text)
            Dim mM2 As Decimal = 0
            mM2 = CDec((2 * Math.PI) * rRadius * cColumnHeightRound)
            mM2 = Math.Round(mM2, 3)
            mM2 = mM2 / 1000
            mM2 = Math.Round(mM2, 3)
            Me.txtTotalM2Round.Text = mM2.ToString
    seems to be ok :blush

    help, after a closer look its incorrect
    Last edited by toecutter; Dec 16th, 2009 at 12:52 AM. Reason: fixed

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width