Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
NSMutable Exercise
//gcc 5.0.4 #import <Foundation/Foundation.h> int main (int argc, const char * argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSMutableSet *repairingCars = [NSMutableSet setWithObjects:@"i20",@"i10",@"BMW",nil]; NSMutableSet *repairedCars = [NSMutableSet setWithObjects:@"XUV300",@"XUV500",@"TUV300",nil]; NSMutableSet *resellCars = [NSMutableSet setWithObjects:@"XUV300",@"i20",nil]; NSMutableSet *soldoutCars = [NSMutableSet setWithObjects:@"TUV300",nil]; NSLog(@"%@",repairingCars); NSLog(@"%@",repairedCars); [repairingCars removeObject:@"i20"]; [repairedCars addObject:@"i20"]; NSLog(@"%@",repairingCars); NSLog(@"%@",repairedCars); for(NSString *repairingCar in repairingCars) { NSLog(@"%@",repairingCar); } for(NSString *repairedCar in repairedCars) { NSLog(@"%@",repairedCar); } NSLog(@"%@",resellCars); NSLog(@"%d",[resellCars intersectsSet:repairedCars]); [repairedCars minusSet:resellCars]; NSLog(@"%@",repairedCars); [pool drain]; return 0; }
run
|
edit
|
history
|
help
0
asss
Even numbers are at the beginning and all the Odd numbers
find maximum in objective c
Book NSSet
Uso de else if
objective c find factorial
nsset
compound intresst in objective c
objective c fibonanci
Class implementation using get method