Matrix

CF

Matrix Unit Digit Swap

The program must accept an integer matrix of size R*C, where C is even and swap the unit digits of the elements in columns 1 and 2, then 3 and…