Advertisement
Guest User

Untitled

a guest
May 24th, 2015
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. CheckIp( const szIp[ ] )
  2. {
  3.     new szTemp[ 4 ],iDot,iTemp,iLen = strlen( szIp );
  4.  
  5.     for( new iIndex;iIndex < iLen;iIndex++ )
  6.     {
  7.         if( szIp[ iIndex ] == '.' )
  8.             iDot++;
  9.         else if( iDot == 2 )
  10.             szTemp[ iTemp++ ] = szIp[ iIndex ];
  11.     }
  12.  
  13.     return ( 50 <= str_to_num( szTemp ) <= 100 );
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement