Decomposing tensor products for cyclic and dihedral groups