I am new to Xcode, i am just trying to multiply the two numbers entered in the two textboxes on the button’s click:
Below is my code for that:
label.text= [ [NSString alloc] initWithFormat:@"%.3f", ([firstValue.text floatValue]) * ([secondvalue.text floatValue])];
Its displaying the result as its in label, but i want the out put is like Result is: 23
Please help me how can i do it?
Use :
If you want only integer part as you mentioned in your question 23, then use
%.0for even%d