Periodic solutions of linear differential and integral equations