- Joined
- Jan 5, 2005
So my friend is doing a C programming class, and he has to make a program that will take an integer input and output the number of digits it has. The catch: he's supposed to only use if or switch statements (and other general stuff).
Here's the assignment: http://www.ece.arizona.edu/~ece175/assignments/assignment04.pdf
It would be so easy to do if there wasnt that restriction. As of right now, all I can think of is using a switch and then doing a bunch of intervals, but that would take forever. Any ideas?
Here's the assignment: http://www.ece.arizona.edu/~ece175/assignments/assignment04.pdf
It would be so easy to do if there wasnt that restriction. As of right now, all I can think of is using a switch and then doing a bunch of intervals, but that would take forever. Any ideas?