Ok, so I need to write the following functions,
a) int first_digit (int n), returning the first digit of the argument
b) int last_digit (int n), returning the last digit of the argument
c) int digits (int n), returning the number of digits of the argument

I am in an intro computer science class and am extremely confused as to what to do. If you could please help, I would greatly appreciate it!!!!
There was the same thread not so far in this forum. Try to find it.

Here it is.
Last edited on
I know, but I used something completely different. I have no idea even where to begin.
What is completely different? Here and there the same function that returns the number of digits.
Topic archived. No new replies allowed.