Function continuous at odd numbers from $0$ to $99$, but discontinuous everywhere else. I have an idea about this but am not entirely sure if it's right. 
If I have a function, say $g(x) = (x-1)(x-3)(x-5)...(x-99)$
The roots of g(x) are only odd numbers from 0 to 99. 
$$
f(x) = \begin{cases} 
      g(x) & x \in\mathbb{Q} \\
      0 & x \notin\mathbb{Q}
   \end{cases}
$$
Is this correct?

I think your answer is correct. The limit of $f(x)$ as $x$ approaches an odd integer is $0$ (because $g$ is continuous) and its value there is $0$ too, so $f$ is continuous there. For rational values of $x$ other than the odd integers $g(x) \ne 0$ but there are irrationals arbitrarily nearby at which $f$ is $0$. For irrational values of $x$ , $f(x) = 0$ but there are noninteger nearby rationals $q$ where $f(q) = g(q)$ is bounded away from $0$.
If I'm wrong (and you're wrong) someone will comment here and tell me. Then I can delete my answer, or leave it as an instructive false start.
