</pre>非常简单,没什么好说的<pre name="code" class="cpp">#include <stdio.h>
void ascending_sort(int x,int y,int z);
int main(void)
{
	int x,y,z;
	scanf("%d %d %d",&x,&y,&z);
	ascending_sort(x,y,z);
	return 0;
}
void ascending_sort(int x,int y,int z)
{
	int temp;
	if( x>y )
	{
		temp = x;
		x = y;
		y =temp;
	}
	if( x>z )
	{
		temp = x;
		x = z;
		z =temp;
	}
	if( y>z )
	{
		temp = y;
		y = z;
		z =temp;
	}
	printf("%d %d %d\n",x,y,z);
}数据结构(C语言版)课后习题1.4
最新推荐文章于 2021-05-20 07:20:37 发布
          
          
       
          
       
       本文详细介绍了使用C++实现升序排序的过程,包括变量初始化、输入整数、排序逻辑及输出排序结果。
本文详细介绍了使用C++实现升序排序的过程,包括变量初始化、输入整数、排序逻辑及输出排序结果。
           
                   
                   
                   
                   
                             
       
           
                 
                 
                 
                 
                 
                
               
                 
                 
                 
                 
                
               
                 
                 扫一扫
扫一扫
                     
              
             
                   520
					520
					
 被折叠的  条评论
		 为什么被折叠?
被折叠的  条评论
		 为什么被折叠?
		 
		  到【灌水乐园】发言
到【灌水乐园】发言                                
		 
		 
    
   
    
   
             
            


 
            