Assuming the cube is closed, you can use the divergence theorem:
where is the surface of the cube and is the region bounded by .
We have
so the flux is 0.
8.2m questions
10.8m answers