mod () function

Users questions: The mod () function problem: 0.5mod8 = 01.5mod8 = 2 (1.5 V into a 2 Mody, the result is 2, yes, but the following:) 0.6mod8 = 11.6mod8 = 24.5mod8 = 4 (4.5 V should not Why enter into a 5, the results should The 5 you? ) 6.5mod8 = 6 (6.5 V should not enter into a 7 Mody, the result should be a 7 ah?) 6.6mod8 = 77.4mod8 = 77.5mod8 = 08.4mod8 = 08.5mod8 = 0 (8.5 not enter into a 9 What should be 5, the results should 1 8.6mod8=1
Experts answer:0.5mod8=01.5mod8=22.5mod8=23.5mod8=44.5mod8=45.5mod8=66.5mod8=67.5mod8=08.5mod8 = 09.5mod8 = 210.5mod8 = 211.5mod8 = 412.5mod8 = 4 ==================================== ====== result of the dividend digit is odd, rounded Dividend digit is even, rounding would not join the Kazakh !===================================== ======== try again:% dimi, afori = 0to100a = (i +0.5) mod7% %=i+0.5% : %=a% br %next%
  • This information provided by the users.Thanks!