calculation


Closed Thread
Results 1 to 4 of 4

Thread: calculation

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Posts
    747

    Default calculation

    Hi

    is it possible to keep the top two digit in a number:
    I have
    trial=512*17
    equals to 8807
    I would like to keep the 88 ans discard the rest.

    thanks

    k

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur View Post
    trial=512*17
    equals to 8807
    I would like to keep the 88 ans discard the rest.
    trial = trial / 100 to keep the 88
    trial = ( trial / 100 ) * 100 to keep the 8800. /100 loses the 07, *100 brings it back up again.

  3. #3
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    why didnt I think of that...

    merci

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Maudite boisson

    Slaque la dose, ou change de sorte
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Calculation Problem - value goes to zero after 65
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 12th March 2010, 05:10
  2. how to add the calculation of temperature in my source code
    By slimpeng in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 20th February 2008, 16:31
  3. 32-Bit or 64-Bit calculation
    By selbstdual in forum PBP Wish List
    Replies: 8
    Last Post: - 12th April 2007, 03:59
  4. Battery Life Calculation???
    By manumenzella in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 24th February 2007, 19:26
  5. Need help with lookup table or direct calculation
    By nverma in forum mel PIC BASIC Pro
    Replies: 24
    Last Post: - 11th October 2006, 18:27

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

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