Good day,
I am quite new to c and trying to find a way to store user integer input into an array as individual digits.
For example,
User input: 2736
I would like it to be stored in array
digits[0] = {2}
digits[1] = {7}
digits[2] = {3}
digits[3] = {6}
I have searched many online discussions but many solutions was to use a for loop and it would not be user friendly if the user is trying to enter a large number for example 209377383838.
Does anyone have a solution to store an input, break it down and store individual number into the array? Thanks for the help!