Dear Student
itz nt like that, both sodium and potassium carbonate on reaction with acid produce CO2 becoz, when acids react with metal carbonates or hydrogen carbonates then they produce salt of the metal, H2O and CO2 gas.
Na2CO3 + HCl ------ NaCl + H2O + CO2
Na2CO3 + H2SO4 -------- Na2SO4 + H2O + CO2
regards