iOS获取六位随机数(可以自动补位比如"0")int a = arc4random() % 100000;NSString *str = [NSString stringWithFormat:@"%06d", a];