请问这个应该要怎么解决?按照要求来写代码,在“PUT YOUR CODE HERE”写内容,例子旁边的#只是他的解释,蟹蟹大lao。题目如下。
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <assert.h>
int bcd(int bcd_value);
int main(int argc, char *argv[]) {
for (int arg = 1; arg < argc; arg++) {
long l = strtol(argv[arg], NULL, 0);
assert(l >= 0 && l <= 0x0909);
int bcd_value = l;
printf("%d\n", bcd(bcd_value));
}
return 0;
}
// given a BCD encoded value between 0 .. 99
// return corresponding integer
int bcd(int bcd_value) {
// PUT YOUR CODE HERE
return 0;
}