CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2009
    Posts
    38

    Distance program & dropping fractions?

    Hi, guys I am suppose to write a program that asks for the weight and distance then displays the shipping charge. The directions say "When calculating the rate, drop fractions of miles, then add one for each whole or partial segment of 500 miles". Does any of you guys know what this means? Please help!

  2. #2
    Join Date
    Apr 2009
    Posts
    598

    Re: Distance program & dropping fractions?

    It is a question about the English language.

    Drop fractions of miles
    If you have 2.3 or 2.8 miles, then drop .3 or .8 and keep only 2 miles.

    Add one for each whole or partial segment of 500 miles
    If you have 1400 miles, then you have 2 whole segments of 500 miles plus a partial segment. In that case you add 3 units.

  3. #3
    Join Date
    Oct 2009
    Posts
    38

    Re: Distance program & dropping fractions?

    i would i write this in a code for my program?

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

Featured