im trying to write a fuction that takes in an integer and returns each of the three differnt digits in a seperate referance permater. Im completly lost as where to start to try to break the number down......please help
thanks
Printable View
im trying to write a fuction that takes in an integer and returns each of the three differnt digits in a seperate referance permater. Im completly lost as where to start to try to break the number down......please help
thanks
this function might help:
int GetDigit(int number,int k)
//return kth digit of number
{
return (int)(number/pow(10,k-1))%10;
}