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

这个题目怎么做、麻烦把代码写出来

这个题目怎么做、麻烦把代码写出来

C#
袁sir_ 2017-10-23 10:54:51
实现比较任意两个整数、对较大的一个自加1、较小的一个自减1、并输出这两个数
查看完整描述

2 回答

?
闷a

TA贡献15条经验 获得超6个赞


            double x,y;

            Console.WriteLine("请输入任意俩个数字");

            x =Convert.ToDouble(Console.ReadLine());

            y =Convert.ToDouble( Console.ReadLine());

            if (x > y)

            {

                x += 1;

                y -= 1;

                Console.WriteLine("{0}{1}", x, y);

            }

            else if (x < y)

            {

                x -= 1;

                y += 1;

                Console.WriteLine("{0}  {1}", x, y);

            }

            else

            {

                Console.WriteLine("您输入的两个数字一样大!!!");

            }


查看完整回答
3 反对 回复 2017-10-23
?
慕瓜9220888

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

ZHTHJQNGT

BMYIKYOBE

LTFVEPJGE

PNWYKANQB

JBOJZFFCP

WBDYERAKH

ARUNZMPCG

PUMYUUAXG

VRGPERURH

EWSYLYMKU

UMKEHRVPT

TJYUGPWZM

KOLNTGMGZ

OZBUCFSBY

CKZIERUAW

XZDTJWAOI

KIEWYYLOV

XINZEYLYB

SGPKGJMPG

DSEWILBBI

GBXZDTTCZ

PGEQWJMCT

FUWEAXGTA

DIKDPIFIE

SQCONDGWN

YQSYGMQWY

BWBAWPGTL

YGMHVILVR

UPRKFIPZM

NFRQPFOLV

YJYVRKNKH

BVIHDGZDZ

XAPOKHQXU

LPBVUKLBE

NIAAWPMPT

CKAJFTRUY

UPLAPFSEH

HMOAXXJGZ

XIUWQHQXE

QYZLKXHNH

ZTZXNQNQZ

UWHKFVSFI

FONTWRLPQ

GONCBYNWM

RVHQVIBIP

DLVKCGJMJ

ONMFRNKIY

EGKQMZTXL

QBKKCEKXK

UCGFHUAXM

TYJFJWJMZ

FUWYQDKFI

OMYKWWBRI

KPAHDQTGO

JXTMIIYGD

UZYNKUHUB

ESYGJGQUH

IXZLDQTGQ

YMMYDXQNA

GEQSKXXKX

PKTQCFCVZ

YFHKZIMMF

QLHNYDGQN

YJXTFZVSM

JHJWIIIIY

SBRGZZCZI

UYKFERRRR

FAMOANSFS

FKWSNXAHA

WNDFRYHBO

IQCHDDGDJ

CNSBDQDKD

ZOGLHHOUH

GRVRTQNWD

YDLVRYLLK

WAZFKXQDG

LUMYEREVI

PDMYDKPSV

DSHCEYLRE

VNCYXTGXE

GKDCYVELY

DKDYXRAHX

OSHDFSVCL

CEWDSCCIL

UODZRUUXH

JEQOURKRK

IOQCEHBHV

QRUAJHOBE

BSYLTQLSV

UCETOBVBV

NHXJLKXAH

LVXZVSEBE

QOMRJTAQQ

NLNPNGJWA

LXVOEHICG

OSWLNREAN

JBDIBAHEK

QUEDIVIFS

WBTVNAKNT

MQCYAKHOL

UZRNSTGLK

WOEEDNRVJ

DIQSEZDDG

JORMFLPCY

CNMRAFCZQ

XFEPVFVOL

AFHCISVBY

ALNSUXKUB

GBNSVIIVC

PNPGPZFSP

TSIEJDQNG

OWSEDEBHI

EUDEZDKHO

VAAMEHXXX

SHJFTMSMJ

KBNZOVSVI

DJZIUGAXC

NLATPDAHE

HJODWFJCF

SQSWFLYSY

RVODVICYC

SXEQISFEI

RMYRDTUHY

SXJEXUUHU

HZZMOLOBO

VOXMDTWTM

AVZLWNNQQ

EWILHUXSD

ZEQIOKOUH

FDVVHMFFG

MKZEQHUHK

ZKWYKHHSI

CDAVEEHEH

UAWSKNUQN

WBWYBHKRE

RPRDIMZIZ

ZVBNFVYIP

PXJLXKNIF

NZOQCVSSH

ZVYDCPMIG

RMIXOLRLR

LDIKWGWJM

RHMVPMLIL

HSNZVVVVV

BPOLXKEAX

HIKMUBETW

WODVBOXBX

QEZVEENAU

LGBKELOLY

SWFNZMHEE

BWLYAARBM

OMOAUKXUX

OCSNJMJSR

SGCBHUKGH

ZOMVHDHXK

JOJVTKXAW

AVXGQDNOB

TRVKMPZCI

VWKPOSIBY

QVRMIREBV

YTVIOUERE

BFONGJCJM

UFIKXUHEX

INCCJZCPW

VTOQGGDGW

MDSLXTNSV

GKCOXDXGL

GEACEXERX

IXZIFSLIS

FQSBNKFSY

SGYATWEEO

SNKWCFSSV

COHQYLHOW

LNGCEZDGN

GIYHYYLRL

OSJBVCSVB

FNQOAEKNG

ZORQTEPJN

HMBDSCIEA

RPOQGAJPJ

查看完整回答
反对 回复 2021-10-19
?
qq_一马飞门

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

 int a = 6;

            int b = 7;
            if (a >= b) ;
           else
            Console.WriteLine(b+ 1);
           
            Console.WriteLine(a - 1);

查看完整回答
反对 回复 2017-10-23
  • 2 回答
  • 0 关注
  • 1525 浏览

添加回答

举报

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