why is (10/24) + 0 0

I divided two integers (int1 / int2) and added 0. The result was 0. This is not correct.
I found a work arround by storing the intermediate result in a extended, so there is no hurry.

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 12:23PM
    rules of variants.
    (int/int) + int result = int
    in your example you had (10/24) +0 this is correct you are getting integer answer
    if you used (10/24) +0.0 you would see 0.42
    ;)

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.