Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import <Foundation/Foundation.h>
- int main (int argc, const char * argv[])
- {
- NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
- int sum = 0;
- for(int i = 0; i != 1000; i++) {
- if (i % 3 == 0 || i % 5 == 0) {
- sum += i;
- }
- }
- NSLog(@"answer: %d", sum);
- [pool drain];
- return 0;
- }
Add Comment
Please, Sign In to add comment