We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.
But ... I'll give you a few hints:
1) A string is also an array (or it can be treated as such) - so you can access each character singly either buy using indexing
myString[i]
or a
foreach
loop.
2) You can check for all digits in a string by using TryParse:
int value;
if (int.TryParse(myString, out value))
{
...
}
3) If the string is all digits, the Length of the string is the number of digits.
Put those together, and you're pretty much there...
Try it yourself, you may find it is not as difficult as you think!
If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!