Here is an implementation of a simple print method I made. I can set it my height from main, but the problem is 5"1 and 5"10 display the same way using %.02f
So if the user type in 5.1 or 5.10 it always display "5.10". Is there a better way of handling this?
- (void) print {
NSLog(@"My age is %i, I weigh %i, and I am %.02f tall", age, weight, height);
}
So if the user type in 5.1 or 5.10 it always display "5.10". Is there a better way of handling this?
- (void) print {
NSLog(@"My age is %i, I weigh %i, and I am %.02f tall", age, weight, height);
}