I’m building a simple calculator for a classroom, this is the code to show the result:
- (void)doTheMathForPlus:(float)val {
float conto = self.contBox + val;
self.myDisplay.text = [NSString stringWithFormat:@"%.02f", conto];
}
I need to know if “conto” have decimals (to change the format of the string in a if statement)
how to do it?
thanks
Hope this helps.