Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 NSMutableArray 中有 7 个浮点值,我需要找到它们之间的最短值,我如何找到最短的值
也许这样的事情会起作用:
int k = [yourArray objectAtIndex:0]; for (unsigned i = 1; i < [yourArray count]; i++){ if([yourArray objectAtIndex:i] < k) k = [yourArray objectAtIndex:i]; }