|
@ -20,8 +20,7 @@ int binaryStrLen(int input){ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
char* convertIntToBinaryStr(int input){ |
|
|
char* convertIntToBinaryStr(int input){ |
|
|
if(input > 3 || input < 0) return NULL; |
|
|
|
|
|
int length = 2; |
|
|
|
|
|
|
|
|
int length = binaryStrLen(input); |
|
|
int rest; |
|
|
int rest; |
|
|
char* result = (char*)malloc(sizeof(char) * length + 1); |
|
|
char* result = (char*)malloc(sizeof(char) * length + 1); |
|
|
result[length] = '\0'; |
|
|
result[length] = '\0'; |
|
|