#include #include #include int main(void) { char buf[4096]; int program[32]; // List of instructions int i, n=0; // Index and number of instructions int a=0, b=0, c=0; // Registers int op, combo; // Operand and combo value scanf("Register A: %d\n", &a); scanf("Register B: %d\n", &b); scanf("Register C: %d\n", &c); fgets(buf, sizeof buf, stdin); // Skip line fgets(buf, sizeof buf, stdin); i=0; while (buf[i] != ' ') i++; for (i++; buf[i]; i+=2) { program[n++] = atoi(buf+i); } for (i=0; i