web123456

ios oc determine if the input number is an integer multiple of another

-(BOOL)judgeStr:(NSString *)str1 with:(NSString *)str2

{

    int a=[str1 intValue];

    double s1=[str2 doubleValue];

    int s2=[str2 intValue];

    

    if (s1/a-s2/a>0) {

        return NO;

    }

    return YES;

}