As the subject reads, I’m attempting to split an int into separate equal parts that are 2 digits wide (ie ExpDate1 to equal ‘12’ and ExpDate2 to equal ‘34’). I’m getting the error, “incompatible types in assignment of ‘unsigned int’ to ‘int’” and I don’t know how to correct this. I’ve tried changing ExpDate from int to char, volatile, unsigned. But nothing seems to give the output I’m looking for.

Can someone please explain what I’ve done wrong here?

```
int n1[2];
int n2[2];
int n = 1234;
Serial.println(n);
{
unsigned int a[4] = { n };
const unsigned int Base = 10;
for (size_t i = 0; i < sizeof(a) / sizeof(*a); i++)
{
unsigned int divisor = Base;
while (a[i] / divisor > divisor) divisor *= Base;
n1 = (a[i] / divisor);
n2 = (a[i] % divisor);
}
Serial.println(n1);
Serial.println(n2);
}
```