xxxxxxxxxx
#include <stdio.h>
int getFirstTwoIntegers(int n) {
if(n < 0) {
n = -n; // consider only positive numbers
}
int firstDigit = n / 10; // get the first digit by integer division
int secondDigit = n % 10; // get the second digit by remainder division
return (firstDigit * 10) + secondDigit; // combine the two digits and return
}
int main() {
int number = 12345;
int result = getFirstTwoIntegers(number);
printf("The first two integers of %d are: %d\n", number, result);
return 0;
}