Firstly, your first for loop in the counter loop is the equivalent of memset(), so use that instead.
Secondly, I don't get the relevence of the number 7490. Can you explain it please. From my understanding of the problem you need to get user input and then find the possible ways for that input.