Last active
December 24, 2015 15:19
-
-
Save beelsebob/6818913 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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