Hi
if I use this (Hardcoding MySum)
the text box correctly displays 195 
while if I build up a string to be the same @"(10+10)+25*7"
I get the answer of 70
debugging MyAnswer shows @"(10+10)+25*7"
any Ideas
Best Regards
if I use this (Hardcoding MySum)
Code:
NSString *mySum = @"(10+10)+25*7";
NSNumber *result = [mySum numberByEvaluatingString];
MyAnswerS.text = [NSString stringWithFormat:@"%@",result];
while if I build up a string to be the same @"(10+10)+25*7"
I get the answer of 70
Code:
NSString *mySum = [NSString stringWithFormat:@"%@",MyAnswer];
NSNumber *result = [mySum numberByEvaluatingString];
MyAnswerS.text = [NSString stringWithFormat:@"%@",result];
any Ideas
Best Regards
Last edited by a moderator: