f[x_] = 1;
c[k_ /; k ≠ 0] = 
      1/(2  Pi) 
        Integrate[
          f[x] Exp[-I k x], {x, 0, Pi}]
c[0] = 
      1/(2  Pi) Integrate[f[x], {x, 0, Pi}]
s[m_, x_] := Sum[c[k] Exp[I k x], {k, -m, m}]

Do[Plot[Evaluate[s[ 10^i, x]], {x, -Pi, Pi}], {i, 1, 
        3}]