Step 1: Concept.
Electric flux through a surface is \( \Phi = \vec{E}\cdot\vec{A} = EA\cos\theta \), where \( \theta \) is the angle between the field \( \vec{E} \) and the outward area vector \( \vec{A} \). The cylinder has three parts: the two flat end faces and the curved side.
Step 2: Flux through the two flat faces.
Let each flat face have area \( A \). The axis is parallel to \( \vec{E} \).
At the face where field lines enter, the outward normal points opposite to \( \vec{E} \), so \( \theta = 180^\circ \):
\[ \Phi_1 = EA\cos 180^\circ = -EA \]
At the face where field lines leave, the outward normal is along \( \vec{E} \), so \( \theta = 0^\circ \):
\[ \Phi_2 = EA\cos 0^\circ = +EA \]
Step 3: Flux through the curved surface.
On the curved side the outward normal is perpendicular to the axis, hence perpendicular to \( \vec{E} \), so \( \theta = 90^\circ \):
\[ \Phi_3 = EA'\cos 90^\circ = 0 \]
Step 4: Total flux.
\[ \Phi = \Phi_1 + \Phi_2 + \Phi_3 = -EA + EA + 0 = 0 \]
This also agrees with Gauss's law: the cylinder encloses no charge, so \( \Phi = q_{enc}/\varepsilon_0 = 0 \).
\[\boxed{\Phi_{total} = 0}\]