Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main() {
- int source_number = 65; // the number that we need to check
- int decimal_digit = source_number/10; // the deciman digit (in our case it is 6)
- int unit_digit = source_number - decimal_digit * 10; // the unit digit (in our case is 5)
- printf("Dec %d, unit %d", decimal_digit, unit_digit);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement