objective c - get an integer -unit digit in a simple way -



objective c - get an integer -unit digit in a simple way -

i not sure english, need unit digit of integer. without complex algorithm api or trick.

for illustration :

int a= 53; int b=76;

this add together because dont "meet quality standards" post! drive me crazy! please , prepare ! took me 10 shoots post this,and other issue also.

i need a=3 , b=6 in simple smart way.

same other digit.

thanks lot .

here how divine number parts

int unitdigit = % 10; //is 3 int tens= (a - unitdigit)/10; //is 53-3=50 /10 =5

objective-c

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -