猿问

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

实现比较任意两个整数、对较大的一个自加1、较小的一个自减1、并输出这两个数

袁sir_
浏览 1526回答 2
2回答

闷a

            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("您输入的两个数字一样大!!!");            }

慕瓜9220888

ZHTHJQNGTBMYIKYOBELTFVEPJGEPNWYKANQBJBOJZFFCPWBDYERAKHARUNZMPCGPUMYUUAXGVRGPERURHEWSYLYMKUUMKEHRVPTTJYUGPWZMKOLNTGMGZOZBUCFSBYCKZIERUAWXZDTJWAOIKIEWYYLOVXINZEYLYBSGPKGJMPGDSEWILBBIGBXZDTTCZPGEQWJMCTFUWEAXGTADIKDPIFIESQCONDGWNYQSYGMQWYBWBAWPGTLYGMHVILVRUPRKFIPZMNFRQPFOLVYJYVRKNKHBVIHDGZDZXAPOKHQXULPBVUKLBENIAAWPMPTCKAJFTRUYUPLAPFSEHHMOAXXJGZXIUWQHQXEQYZLKXHNHZTZXNQNQZUWHKFVSFIFONTWRLPQGONCBYNWMRVHQVIBIPDLVKCGJMJONMFRNKIYEGKQMZTXLQBKKCEKXKUCGFHUAXMTYJFJWJMZFUWYQDKFIOMYKWWBRIKPAHDQTGOJXTMIIYGDUZYNKUHUBESYGJGQUHIXZLDQTGQYMMYDXQNAGEQSKXXKXPKTQCFCVZYFHKZIMMFQLHNYDGQNYJXTFZVSMJHJWIIIIYSBRGZZCZIUYKFERRRRFAMOANSFSFKWSNXAHAWNDFRYHBOIQCHDDGDJCNSBDQDKDZOGLHHOUHGRVRTQNWDYDLVRYLLKWAZFKXQDGLUMYEREVIPDMYDKPSVDSHCEYLREVNCYXTGXEGKDCYVELYDKDYXRAHXOSHDFSVCLCEWDSCCILUODZRUUXHJEQOURKRKIOQCEHBHVQRUAJHOBEBSYLTQLSVUCETOBVBVNHXJLKXAHLVXZVSEBEQOMRJTAQQNLNPNGJWALXVOEHICGOSWLNREANJBDIBAHEKQUEDIVIFSWBTVNAKNTMQCYAKHOLUZRNSTGLKWOEEDNRVJDIQSEZDDGJORMFLPCYCNMRAFCZQXFEPVFVOLAFHCISVBYALNSUXKUBGBNSVIIVCPNPGPZFSPTSIEJDQNGOWSEDEBHIEUDEZDKHOVAAMEHXXXSHJFTMSMJKBNZOVSVIDJZIUGAXCNLATPDAHEHJODWFJCFSQSWFLYSYRVODVICYCSXEQISFEIRMYRDTUHYSXJEXUUHUHZZMOLOBOVOXMDTWTMAVZLWNNQQEWILHUXSDZEQIOKOUHFDVVHMFFGMKZEQHUHKZKWYKHHSICDAVEEHEHUAWSKNUQNWBWYBHKRERPRDIMZIZZVBNFVYIPPXJLXKNIFNZOQCVSSHZVYDCPMIGRMIXOLRLRLDIKWGWJMRHMVPMLILHSNZVVVVVBPOLXKEAXHIKMUBETWWODVBOXBXQEZVEENAULGBKELOLYSWFNZMHEEBWLYAARBMOMOAUKXUXOCSNJMJSRSGCBHUKGHZOMVHDHXKJOJVTKXAWAVXGQDNOBTRVKMPZCIVWKPOSIBYQVRMIREBVYTVIOUEREBFONGJCJMUFIKXUHEXINCCJZCPWVTOQGGDGWMDSLXTNSVGKCOXDXGLGEACEXERXIXZIFSLISFQSBNKFSYSGYATWEEOSNKWCFSSVCOHQYLHOWLNGCEZDGNGIYHYYLRLOSJBVCSVBFNQOAEKNGZORQTEPJNHMBDSCIEARPOQGAJPJ

qq_一马飞门

 int a = 6;            int b = 7;            if (a >= b) ;           else            Console.WriteLine(b+ 1);                         Console.WriteLine(a - 1);
随时随地看视频慕课网APP
我要回答