| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1046 人关注过本帖
标题:[求助]一个感兴趣的题目
只看楼主 加入收藏
bingxue
Rank: 1
等 级:新手上路
帖 子:19
专家分:0
注 册:2005-3-23
收藏
 问题点数:0 回复次数:5 
[求助]一个感兴趣的题目
如何将三个数从大到小排列?摆脱各位老大了
搜索更多相关主题的帖子: 兴趣 
2005-03-31 21:08
幻风幻云
Rank: 1
等 级:新手上路
帖 子:762
专家分:0
注 册:2005-1-14
收藏
得分:0 

2005-04-01 14:54
live41
Rank: 10Rank: 10Rank: 10
等 级:贵宾
威 望:67
帖 子:12442
专家分:0
注 册:2004-7-22
收藏
得分:0 
入门的书都有的。
2005-04-01 22:35
yushengou
Rank: 1
等 级:新手上路
帖 子:401
专家分:0
注 册:2005-3-30
收藏
得分:0 
temp=Aa[ii];
     Aa[ii]=Aa[ii+1];
     Aa[ii+1]=temp;
这是基本语句啦

我是初学者,希望大家能多多帮助我 /bbs/showimg.asp?BoardID=34&filename=2005-4/200542294030151.gif" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://bbs./bbs/showimg.asp?BoardID=34&filename=2005-4/200542294030151.gif');}" onmousewheel="return imgzoom(this);" alt="" />
2005-04-02 09:31
jacky
Rank: 1
等 级:新手上路
帖 子:104
专家分:0
注 册:2004-12-17
收藏
得分:0 

using System; public class Test { public static void Main() { int x; int y; int z; Console.WriteLine ("请输入三个数:"); x=int.Parse (Console.ReadLine ()); y=int.Parse (Console.ReadLine ()); z=int.Parse (Console.ReadLine ()); if(x>y) { if(x>z) { Console.WriteLine ("{0},{1},{2}",x,y,z); } else Console.WriteLine ("{0},{1},{2}",z,y,x); } else { if(y>z) { Console.WriteLine ("{0},{1},{2}",y,z,x);

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

2005-04-02 13:58
yushengou
Rank: 1
等 级:新手上路
帖 子:401
专家分:0
注 册:2005-3-30
收藏
得分:0 
以下是引用jacky在2005-4-2 13:58:32的发言:

using System; public class Test { public static void Main() { int x; int y; int z; Console.WriteLine ("请输入三个数:"); x=int.Parse (Console.ReadLine ()); y=int.Parse (Console.ReadLine ()); z=int.Parse (Console.ReadLine ()); if(x>y) { if(x>z) { Console.WriteLine ("{0},{1},{2}",x,y,z); } else Console.WriteLine ("{0},{1},{2}",z,y,x); } else { if(y>z) { Console.WriteLine ("{0},{1},{2}",y,z,x);

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

我试了下。不是很全面。改了一下,我的书写格式很烂的。 if(x>y) { if(y>z) {Console.WriteLine("{0},{1},{2}",x,y,z);} else if(y<z) {Console.WriteLine("{0},{1},{2}",x,z,y);} else if(x<z) {Console.WriteLine("{0},{1},{2}",z,x,y);} } else if(x<y) { if(x>z) {Console.WriteLine("{0},{1},{2}",y,x,z);} else if(x<z) {Console.WriteLine("{0},{1},{2}",y,z,x);} else if(y<z) { Console.WriteLine("{0},{1},{2}",z,y,x); } }


我是初学者,希望大家能多多帮助我 /bbs/showimg.asp?BoardID=34&filename=2005-4/200542294030151.gif" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://bbs./bbs/showimg.asp?BoardID=34&filename=2005-4/200542294030151.gif');}" onmousewheel="return imgzoom(this);" alt="" />
2005-04-02 14:25
快速回复:[求助]一个感兴趣的题目
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.029632 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved