File: testmodulo.kbs

package info (click to toggle)
basic256 2.0.99.10-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,888 kB
  • sloc: cpp: 17,185; yacc: 4,025; lex: 1,466; java: 1,091; sh: 39; xml: 33; makefile: 20
file content (7 lines) | stat: -rw-r--r-- 236 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
# testmodulo.kbs - modulo calculation
# 2008-08-29 jmr
print "6 % 4 = 2 -> " + 6 % 4
print "10 % 3 = 1 -> " + 10 % 3
print "1024 % 3 = 1 -> " + 1024 % 3
# mod casts floats to int to do it anyway
print "55.7777 % 4 = 3 -> " + 55.7777 % 4