A measurement of inclusive W and Z production cross sections in pp collisions at sqrt(s)=7 TeV is presented. The electron and muon decay channels are analyzed in a data sample collected with the CMS detector at the LHC and corresponding to an integrated luminosity of 36 inverse picobarns. The measured inclusive cross sections are sigma(pp-> WX) B(W-> l nu) = 10.30 +/- 0.02 (stat.) +/- 0.10 (syst.) +/- 0.10 (th.) +/- 0.41 (lumi.) nb and sigma(pp -> ZX) B(Z-> l^+l^-) = 0.974 +/- 0.007 (stat.) +/- 0.007 (syst.) +/- 0.018 (th.) +/- 0.039 (lumi.) nb, limited to the dilepton invariant mass range 60 to 120 GeV. The luminosity-independent cross section ratios are [sigma(pp->WX) B(W-> l nu)]/[sigma(pp-> ZX) B(Z->l^+l^-)] = 10.54 +/- 0.07 (stat.) +/- 0.08 (syst.) +/- 0.16 (th.) and [sigma(pp->W^+X) B(W^+ -> l^+nu)] / [sigma(pp->W^- X) B(W^- -> l^- nu)] = 1.421 +/- 0.006 (stat.) +/- 0.014 (syst.) +/- 0.029 (th.). The measured values agree with next-to-next-to-leading order QCD cross section calculations based on recent parton distribution functions.