Results 1 to 2 of 2

Thread: Summary rounding

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Location
    USA
    Posts
    27
    I wrote a little program and what will happen is the user will enter a number, such as 5. Then the user will click okay and it will clear the form. Let's say the user enters, 4. It's okay and then exits the current form and goes to the summary form. In the summary form, it displays an average of 4, rather than 4.5.

    'Average of Scores in main form
    giCustomerCount = giCustomerCount + 1
    giPunch = giPunch + iPunch
    giSummaryPunch = giPunch / giCustomerCount

    Any help will be appreciated, thanks in advance

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Use Single rather than Integer for your variable definitions.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

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