How can I convert a long long into an array in C?
Hello everyone, I'm working on a project that does an algorithm with the given input. I have the input stored in a long. with the given input, I need to convert ânumberâ into an array so I can have access to each digit. for example, if ânumber = 73757383â I need to convert that into an array: array = [7, 3, 7, 5, 7...] to be able to do the algorithm (multiply every other digit, then add the others together). But I canât seem to figure out how to do this. Any help is appropriate. Also just as a note, I'm including the cs50 library. Thank you! my code is also in this solo link. https://code.sololearn.com/ca1442A6A25a #include <stdio.h> #include <cs50.h> #include <math.h> int main(void) { long credit; int number; do { credit = get_long("Number: "); number = floor(log10(credit) + 1); printf("%lu\n", credit); } while (number < 13 || number > 16); }