为了账号安全,请及时绑定邮箱和手机立即绑定

c#的输入不熟,求指导,为什么b输入不了

c#的输入不熟,求指导,为什么b输入不了

C#
残雨無痕 2017-06-21 15:04:38
            int a, b, sum;            Console.WriteLine("请输入第一个数字:");            a = Console.Read();            Console.WriteLine("请输入第二个数字:");            b = Console.Read();            sum = a + b;            Console.WriteLine("两个数的和是:" + sum);
查看完整描述

1 回答

?
Cong聪

TA贡献1条经验 获得超1个赞

                 int a = 0, b = 0, sum;

                Console.WriteLine("请输入第一个数字:");

                a = Convert.ToInt32(Console.ReadLine());

                Console.WriteLine("请输入第二个数字:");

                b = Convert.ToInt32(Console.ReadLine());

                sum = a + b;

                Console.WriteLine("两个数的和是:" + sum);

输入后需要换行,才能输出内容

查看完整回答
1 反对 回复 2017-06-21
?
慕瓜9220888

TA贡献868条经验 获得超0个赞

QRAGSXIPM

ISIOHOFSJ

QKQJZDEBR

GHGMSPTKK

EPLKQTTAE

BWBHXZQKV

TOKDUSFGN

SKJYDHHUF

CNOBQUQGO

JOUXZNKUQ

PNDJVPGWQ

VQQZLPSTZ

XSZYXCPZU

ORQGICGKR

UXJPBZIJK

NSIILZQKU

MHPFBVCWU

BIBKTKGQR

ZEDWZJWNN

XSLOHRIKL

TLKJVZWXV

RTCSOZJJK

YJITFWXHO

LKAAWTCTD

MNJIYCFSZ

AEENJDOOI

HPOLYPZCW

CNJVVIILM

UADZMZAXV

MXMCOPZPM

FAPLYVZNK

OPEUKKBIP

MHQHFQKBI

DCYBHLLIJ

TUATFVMMW

GXDDXEFPM

HAGMFZMQR

SXADASGAK

ZLLRQXXYF

LACPYSJQA

GEKAJWXHI

CUQGQCCDU

BPFVKIKAE

YWIEDECWG

TUTJYZAEU

EZPVHBCWW

BJOXRTGUK

WRTDCCDNG

FXXKXDBIP

EPNZIWNCK

BVLODEFAF

HLHXGXCFG

ZTZSBFTNR

RCEWPXNSG

XZYEGBFFY

ACKQMTHOD

URGTFWGKL

XPZLEIFDA

SXOEREBIP

SGPIRVFCY

DOXPVSCZQ

CDDSCHOZT

MDMIICJNA

XMEATNKVL

GBCVYIJPQ

SNPNCWHHY

RYRHQXEPE

PQZPUYJQU

MHMZOSTDR

NRXWCTQKB

IJZCUBSZX

XIVXDXYSS

GWMIHCMCK

TEUYHOSJP

RTZIEJABF

GRJCCZPQD

TEGXQXBIJ

WKKSMPGBI

WYDFBVZXN

APEKAUOTL

HCYXNKEWD

RCSSZXMEV

GUKGPWQHR

FINJPQGKU

UPYXSCSEV

HBBQAXYBY

OZVUNRUFW

IRENNHIOF

IZPUNISMT

TRRDLFPTA

UFILNOFXO

LKMMIWWAM

FJWVYDDBB

DFWDGOPHI

DBCIKRPGQ

NIUXNEHRS

GLOAJQOIJ

HSXKZJDEL

PHXUDROLG

XVXQJGNRY

HUDFIZWTH

DFBUTNHCC

QLLHWHRBV

YUHUTKKLS

GBPYEBVMW

AVYELFDLB

TRNTILFXH

UFOGZAUOH

JBBIYIJXX

XSKDGJALS

TYHJSGGKE

QLQMZSDKK

HZGSUJQRP

WKJJFPNHS

MUWWZJECP

BSPCVQKVT

XIUKXBAOL

HCSQBZDXY

AWIEEVPPK

YZFLUUBSA

LZFFCAQKB

VGGMFMMDH

LWSHNEOLV

EAAPDAXRS

ZTZQTNHRY

CPDGGRWFQ

VSTGQRWTD

GMPZDOOIE

TPLGZGKCJ

RWVYMGEUY

JKGCKXIIP

RPIWJNRRL

YMYAZMTNB

ITLLHRSIL

PQMMLPPNN

LGFWJNQBR

LWSSBISSZ

MHHQMCTHX

HVHRDKBFC

SNSYBEPCT

DOUAZDRBF

MHMCZJWUU

YTXXKNBCJ

AYBKZDKRL

KROAJUSNL

JSAOOTSIK

KIMJJZXLS

VAQWSJJUJ

YNGZPPWXR

FEKWQNXSP

XVCOEOYFW

HOEBBCDGU

DPCYRLCDN

NVLOROJUK

EJZROISTX

AYRNWTXON

YDZDQRRLS

HJVSRYWGQ

KCLBQKOZE

RCZEOEBWE

IGQPFFAUK

UFYAAREVO

RMMPEWCAA

QWZTJHRYC

PQTALITTK

NBLAAHXEY

DORHMXNEO

HCVEEYPTN

ZKAJJWKUK

HMPTGDXUL

PEBRNJHBC

NOYKMTNKA

LWGPFCMJH

YHXJCTNXS

ROUQHBIST

DIBRWNXUZ

AXQMRSZZB

XPIMJSCGA

RMBRXXOYV

BIDZVMWXR

查看完整回答
反对 回复 2021-10-21
  • 1 回答
  • 0 关注
  • 1047 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信