I need to write a function that will ask for an integer. The function needs to determine the sign (positive or negative) and the number of times a digit appear in the given integer for all possible digits (i.e., 0, 1, 2,…9). I'm stuck because I don't know how to use mod/loops to extract each number from the possible input (which can be anything from a 1 digit number [3] to a 10 digit number [1245029341])

A sample of the output should be :

Enter an integer: 1034029

The sign : +

The counts of digits:

0 2

1 1

2 1

3 1

4 1

5 0

6 0

7 0

8 0

9 1

P.S. Can't use arrays (haven't learned them yet)

So basically, my real problem is how to extract each single number from the input at a time until there is no number to extract.