When I calculate with numbers in my App, there are no decimals in my output! this is the code I am using:
int Vijfhonderdmeter = [_VijfHonderd.text intValue];
int vijftienhonderdmeter = [_vijftienhonderd.text intValue];
int vijfdeeldrie = vijftienhonderdmeter / 3;
int puntentotaal = Vijfhonderdmeter + vijfdeeldrie;
_PuntenTotaal.text = [NSString stringWithFormat:@"%d",puntentotaal];
The real output should be 87,18667, but my _Puntentotaal
label only shows 87.
Has anyone got a solution?
By the way:
(_VijfHonderd.text intValue = 44.05).
(_vijftienhonderd.text intValue = 129.41).
Thank you for your time and help :)