For the first problem:
1 7 6
4 - 8
3 5 2
7 and 8 cannot be on corners, while 1 and 2 must be in them, and the rest follows easily.
The second problem is impossible: 1 and 8 must go in corners, and no matter what other numbers go in the other corners, some middle row numbers would not be integers. (Next to the corner with the 1 we should have two odd corners so averages will be integer; for the same reason, next to the corner with the 8, we need two even corners; all together, this makes 6 corners!) |