The inward and outward electric flux from a closed surface are respectively 8×103 and 4×103 units. Then the net charge inside the closed surface is
4×103 ε0 coulomb
qencϵ0=ϕnet
⇒qenc=ϕnet×ϵ0
Here, Net flux through the surface, ϕnet = 8×103 − 4×103
= 4×103
Hence, we can calculate the enclosed charge by placing it in the above formula.