I try to calculate a miles per hours. For this I write a code like this
mint=sec/60;
hour=mint/60;
mph=miles/hour;
nsstring *speed=[nsstring stringwithformat:@"%5.2f",mph];
[mph settext: speed];
I get a miles from this code
miles = (steps *steplength)/1500;
NSString *distance =[NSString stringWithFormat:@"%5.3f",TotalDistance];
[Miles1 setText:distance];
And the error is shown me like this
miles per hour ans is (inf)
help me out