Skip to content

Instantly share code, notes, and snippets.

@beelsebob
Last active December 24, 2015 15:19
Show Gist options
  • Save beelsebob/6818913 to your computer and use it in GitHub Desktop.
Save beelsebob/6818913 to your computer and use it in GitHub Desktop.
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[])
{
@autoreleasepool {
int number = 0;
int round = 1;
NSMutableArray *array = [NSMutableArray array];
while (round <= 10) {
NSLog(@"Round #%i: Enter a number between 1 and 10", round);
scanf("%i", &number);
[array addObject:@(number)]
[array sortUsingSelector: @selector(compare:)];
NSLog(@"Your list: %@", array);
round++;
}
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment