0
How do i break a 5 Digit Zipcode so i can later add each digit together and get the check sum digit.
3 Respuestas
+ 2
Assuming you read the zipcode as an integer:
int CheckSum(int zip)
{
int sum=0;
while(zip!=0)
{ sum+=zip%10; zip/=10; }
// To save the digits for later, assign
// zip%10 inside array elements.
return sum;
}
+ 1
Thank You. but I figured it . I'll post my code shortly