Can some one help with a calculation please.
The following code is from two TextFields and inputs into a third one (endmonth1year1percentageTextField). When i put in the numbers (100 for the first and 145 for the second) I get an output of 1 instead of 1.45. What I really need is that 1.45 turned into a percentage as in .45.
float x = ([startmonth1year1TextField.text floatValue]);
float c = (([endmonth1year1TextField.text floatValue]) / x);
endmonth1year1percentageTextField.text = [[NSString alloc] initWithFormat:@"%2.f", c];
Any help is appreciated. Thanks