guys, i realise i've made 3 threads in the last 24 hours, which is probably excessive and i'm sorry. but i consider this to be a different subject.
i'm supposed to design a program that based on a 6 bit code, add two numbers together, subtract one number from another, multiply two numbers together or divide one number by another. the codes are as follows
if the code is 32 hex you must add InputA to InputB
if the code is 34 hex you must subtract InputB from InputA
if the code is 2 hex you must multiply InputA and InputB
if the code is 3 hex you must divide InputA by InputB
design your program to accept a code and two inputs then display the corresponding result and the code on the screen.
i've made the program already. and it all works fine. BUT i think i might have mis interperated the "6 bit code" bit, i just did
and then checked it to be 32||34||2||3Code:scanf("%d", &code)
do you guys think i've done that incorrectly? i'm assuming i have. what do you think?