- #1
teng125
- 416
- 0
pre n >= 0
post checksum(n) = CHKSUM(n)
reads n
changes -
mem -
Remark: Let n be an integer number. Furthermore, CHKSUM(n) = “sum of digits of n”. checksum is the name of the module to be developed.
Develop a recursive algorithm for the above specification. Assume and use functions
div function and mod function.
can smby pls show me how to write this algorithm
thanx
post checksum(n) = CHKSUM(n)
reads n
changes -
mem -
Remark: Let n be an integer number. Furthermore, CHKSUM(n) = “sum of digits of n”. checksum is the name of the module to be developed.
Develop a recursive algorithm for the above specification. Assume and use functions
div function and mod function.
can smby pls show me how to write this algorithm
thanx