程序代写代做代考 algorithm 以下为去年的程序输出作为参考

以下为去年的程序输出作为参考
Here is an answer key that may help you to figure out the algorithms for each function. The first colun is the test name the second column is the number of points and the third column shows the test values and expected result.
compileTest % 5 % make clean >/dev/null; make
integerAdd0 % 2 % Option = 0 Param1 = x5678 Param2 = x1234 Result = x68AC
integerAdd1 % 2 % Option = 0 Param1 = x1234 Param2 = xFFEC Result = x1220
integerAdd2 % 1 % Option = 0 Param1 = x0000 Param2 = x1234 Result = x1234
integerSub0 % 2 % Option = 1 Param1 = x5678 Param2 = x1234 Result = x4444
integerSub1 % 2 % Option = 1 Param1 = x1234 Param2 = xFFEC Result = x1248
integerSub2 % 1 % Option = 1 Param1 = xAA55 Param2 = x3355 Result = x7700
integerMul0 % 4 % Option = 2 Param1 = x5678 Param2 = x0000 Result = x0000
integerMul1 % 3 % Option = 2 Param1 = x1234 Param2 = x0010 Result = x2340
integerMul2 % 3 % Option = 2 Param1 = x1234 Param2 = x0003 Result = x369C
binaryOr0 % 10 % Option = 3 Param1 = x5678 Param2 = x0000 Result = x5678
binaryOr1 % 10 % Option = 3 Param1 = x0AA0 Param2 = x0550 Result = x0FF0
binaryOr2 % 5 % Option = 3 Param1 = x1234 Param2 = x6789 Result = x77BD
lshift0 % 10 % Option = 4 Param1 = x1234 Param2 = x0004 Result = x2340
lshift1 % 10 % Option = 4 Param1 = xAAAA Param2 = x0001 Result = x5554
lshift2 % 5 % Option = 4 Param1 = x8765 Param2 = x0008 Result = x6500
rShift0 % 10 % Option = 5 Param1 = x1234 Param2 = x0005 Result = x0091
rShift1 % 10 % Option = 5 Param1 = x4321 Param2 = x0008 Result = x0043
rShift2 % 5 % Option = 5 Param1 = xA5A5 Param2 = x0002 Result = x2969

Leave a Reply

Your email address will not be published. Required fields are marked *