Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static int testtens(int value) {
- int i = 0;
- int power = mlog(value);
- int badvalue = value;
- if (value != 1) {
- if (value < 10) {
- return -EINVAL;
- }
- do
- {
- if(badvalue > 1 && badvalue%10!=0)
- {
- return -EINVAL;
- }
- badvalue /= 10;
- } while ( badvalue>1);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement