Theorem. \[ex(C_3) = \left\lfloor n^2/4 \right\rfloor.\]
Proof.
\[\sum_{uv\in E} \deg(u)+\deg(v) = \sum_{v\in V} \deg(v)^2 \ge (2m)^2/n.\] In a triangle free graph we must have \[\sum_{uv\in E} \deg(u)+\deg(v) \le mn.\] Hence: \[4m^2/n \le mn \implies m\le n^2/4.\]
The complete bipartite graph \(K_{\left\lfloor n/2 \right\rfloor, \left\lceil n/2 \right\rceil}\) shows that this is tight.