What is the sum of all real numbers $x$ for which $|x^2-12x+34|=2?$
$\textbf{(A) } 12 \qquad \textbf{(B) } 15 \qquad \textbf{(C) } 18 \qquad \textbf{(D) } 21 \qquad \textbf{(E) } 25$
Split the equation into two cases, where the value inside the absolute value is positive and nonpositive.
Case 1:
The equation yields $x^2-12x+34=2$, which is equal to $(x-4)(x-8)=0$. Therefore, the two values for the positive case is $4$ and $8$.
Case 2:
Similarly, taking the nonpositive case for the value inside the absolute value notation yields $x^2-12x+34=-2$. Factoring and simplifying gives $(x-6)^2=0$, so the only value for this case is $6$.
Summing all the values results in $4+8+6=\boxed{\textbf{(C) }18}$.