$f(x)=1$,if $x\in (\mathbb{R-Q})\cup \{0\}$,  

$$f(x)=1-\frac1p, \text{ if }x= \frac np,n\in \mathbb{Z}-\{0\}, p\in \mathbb{N}, \gcd(n,p)=1$$

I want to show that it is continuous at every irrational point. I was able to show that it is discontinuous at rational points through sequential criteria. But I am not able to show that it is continuous at irrational points. I think I may have to use the definition of continuity, i.e $\forall \epsilon>0, \exists \delta>0$ such that $|x-c|<\delta \implies |f(x)-f(c)|<\epsilon$. But I have no clue as to how to start for it. Any hints are appreciated!

So, this is what I've tried so far:

If b is an irrational number and $\epsilon>0$, then there is $p\_0\in N$ such that $1/p\_0<\epsilon$. There are only a finite number of rationals with denominator less than $p\_0$ in the interval $(b-1/p\_0,b+1/p\_0)$. Hence $\delta$ can be chosen so small that the nbd $(b-\delta,b+\delta)$ contains no rationale with denominator less than p. Then for $|x-b|<\delta$, we have$ |f(x)-f(b)|=|f(x)-1| <|f(x)|<1/p\_0<\epsilon$.

Is this correct?