1 / 3

Integer Arithmetic

Integer Arithmetic. Mod and . Two of the more unusual arithmetic operators are Mod and Excel and VBA let you use them on Doubles as well, but we will stick to integers

sherry
Télécharger la présentation

Integer Arithmetic

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Integer Arithmetic

  2. Mod and \ • Two of the more unusual arithmetic operators are Mod and \ • Excel and VBA let you use them on Doubles as well, but we will stick to integers • The \ operator is integer divide. It gives you the whole part of the answer without a remainder when two integers are divided • Mod gives the remainder

  3. Examples • 17 \ 3 = 5 (the integer part of the quotient) • 17 Mod 3 = 2 (the remainder) • 24 \ 5 = 4, while 25 \ 5 = 5 • 24 Mod 5 = 4, while 25 Mod 5 = 0 • You can see these in action in the spreadsheet called CoinsIntegerDemo • This sheet also illustrates using a piece of clipart for a button

More Related