Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.56 KB | None | 0 0
  1. static int testtens(int value) {
  2.         int i = 0;
  3.         int power = mlog(value);
  4.         int badvalue = value;
  5.  
  6.         if (value != 1) {
  7.  
  8.                 if (value < 10) {
  9.                         return -EINVAL;
  10.                 }
  11.  
  12.                 do
  13.                 {
  14.                         if(badvalue > 1 && badvalue%10!=0)
  15.                         {
  16.                                 return -EINVAL;
  17.                         }
  18.                         badvalue /= 10;
  19.                 } while ( badvalue>1);
  20.  
  21.  
  22.  
  23.         }
  24.  
  25.         return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement