#import <Foundation/Foundation.h>
#include <stdint.h>
void sort(int *, int *);
int main(int argc, const char * argv[]) {
@autoreleasepool {
// insert code here...
NSLog(@"Hello, World!");
int *p1, *p2;
int a,b;
printf("input:\n");
scanf("%d%d",&a,&b);
p1 = &a;
p2 = &b;
sort(&a,&b);
printf("sort result is %d,%d\n",*p1,*p2);
}
return 0;
}
void sort(int *a, int *b)
{
int p;
if (*a < *b) {
p = *a;
*a = *b;
*b = p;
}
}