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.
9.3m questions
12.1m answers