
while문 문법
while(expression)
program statement
최대공약수 찾는 코드
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[])
{
unsigned int u, v, temp;
NSLog(@"Please type in two nonnegative integer");
scanf("%u%u",&u, &v);
while(v!=0){
temp = u%v;
u=v;
v=temp;
}
NSLog(@"Their greatest common divisor is %u",u);
return 0;
}
