Question: * int condMultAddSub(int x) * Return value: Should exactly duplicate the effect of the expression (x > * Legal constants: Only 1-byte, like @x80 to
* int condMultAddSub(int x) * Return value: Should exactly duplicate the effect of the expression (x > * Legal constants: Only 1-byte, like @x80 to 8xFF, or to 255. * Legal statements: Only variable declarations, assignments and return. No "if", "for", "white", "do while", "switch". * * Notes: - You CANNOT use "if" statements, nor the "ternary if" x?y: z. You CANNOT enter the constant @x4010 directly in your function, because it requires more than one byte. Build it from 1-byte constants using bitwise operations. - You CANNOT use the "*" operator to multiply by 256. - You CANNOT use the "_" operator to subtract 3. * * Examples: condMultAddSub(0x88776608) -- 0x77664810 condMultAddSub (0x55667788) -- Ox55667785 */ int condMultAddSub(int x) { * int condMultAddSub(int x) * Return value: Should exactly duplicate the effect of the expression (x > * Legal constants: Only 1-byte, like @x80 to 8xFF, or to 255. * Legal statements: Only variable declarations, assignments and return. No "if", "for", "white", "do while", "switch". * * Notes: - You CANNOT use "if" statements, nor the "ternary if" x?y: z. You CANNOT enter the constant @x4010 directly in your function, because it requires more than one byte. Build it from 1-byte constants using bitwise operations. - You CANNOT use the "*" operator to multiply by 256. - You CANNOT use the "_" operator to subtract 3. * * Examples: condMultAddSub(0x88776608) -- 0x77664810 condMultAddSub (0x55667788) -- Ox55667785 */ int condMultAddSub(int x) {
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
