File: minusmodulo.mona

package info (click to toggle)
mona 1.4-18-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 3,316 kB
  • sloc: ansic: 13,825; cpp: 12,615; sh: 4,569; makefile: 111; lisp: 48
file content (10 lines) | stat: -rw-r--r-- 144 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
var1 i,j,k;

((j>k => i=0) &
 (j<=k => ((j>0 => i=j-1) &
           ((j=0 & k>0) => i=k-1) &
           ((j=0 & k=0) => i=0))))

 <=>

i=j-1%k;