Solution: First, we find the unit vector normal to each of the six sides of the cube. Then, we calculate the scalar product A^ nds, where ds is the element of surface on each side of the cube. Integrating on each side and summing up the contributions gives the net flux of A through the closed surface enclosing the cube.
.