Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // main.m
- // Grootste Gemene Deler
- //
- // Created by Robbe Vandecasteele on 7/02/11.
- #import <Foundation/Foundation.h>
- int main (int argc, const char * argv[])
- {
- NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
- unsigned int u, v, temp;
- NSLog(@"Geef 2 tetn in.");
- scanf("%u%u", &u, &v);
- while (v != 0) {
- temp = u % v;
- u = v;
- v = temp;
- }
- NSLog(@"De grootste gemene deler is %u", u);
- [pool drain];
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement