This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
notes:discrete:fall2022:projects:cnv0 [2022/09/20 01:39] – [VERIFICATION] abarbcal | notes:discrete:fall2022:projects:cnv0 [2022/09/22 01:56] (current) – [PROGRAM] dmuck | ||
---|---|---|---|
Line 26: | Line 26: | ||
The n-ary value of something is determined by the number of " | The n-ary value of something is determined by the number of " | ||
=====ALGORITHM: | =====ALGORITHM: | ||
+ | Somewhere in the algorithm you may need to make use of the modulo (%) operator. The modulo operator gives you the remainder after a division. For example 5 % 2 would give you 1, since there is a remainder of 1 after dividing 5 by 2. This operator can be used to check if the result of two numbers being divided is a whole number (divider % divisor == 0). | ||
=====SPECIFICATIONS===== | =====SPECIFICATIONS===== | ||
Line 69: | Line 69: | ||
The start argument is the lower bound of where the program will begin to check for n-ary numbers. | The start argument is the lower bound of where the program will begin to check for n-ary numbers. | ||
- | The end argument is the upper bound of where the program will stop to check for n-ary values. | + | The end argument is the upper bound of where the program will stop checking |
Hence, if you have the following case: | Hence, if you have the following case: | ||
Line 91: | Line 91: | ||
x.xxxx (Time) | x.xxxx (Time) | ||
</ | </ | ||
+ | |||
+ | <cli> | ||
+ | lab46: | ||
+ | 4 6 8 9 10 14 15 | ||
+ | x.xxxx (Time) | ||
+ | </ | ||
+ | |||
+ | <cli> | ||
+ | lab46: | ||
+ | 12 16 | ||
+ | x.xxxx (Time) | ||
+ | </ | ||
+ | |||