What do you have to use? That function, the "modified Dirchlet function" (the Dirichlet function itself is 0 for x rational, 1 for x irrational), can be proved to be continuous exactly on the irrational numbers and 0. That means that it is a bounded function whose set of discontinuities has measure 0. There is a theorem that says such a function is Riemann integrable.