Questions tagged «addition»




1
使用模量添加C
我遇到了一个有趣的C代码,可以打印出来A + B,但是我很难理解它。 输入格式: A B 其中A,B是介于之间的整数,0并10用单个空格分隔。 码: main( n ) { gets( &n ); printf("%d", n % 85 - 43); } 这是用于简短编码的,请不要在意警告。 到目前为止,我的理解是: gets( &n )将A,空格和B的ASCII值存储在的低三字节中n。例如,A = 3和B = 8将产生n = 0x00382033。给定条件可以防止n溢出。但是我不知道n % 85 - 43产量如何A + B。 您如何得出这些数字?
81 c  addition  mod 

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.