#include<stdio.h>
void swap(int *q1,int *q2)
{
int term;
if(*q1>*q2)
{
term=*q1;
*q1=*q2;
*q2=term;
}
}
void excharge(int *p1,int *p2,int *p3)
{
swap(p1,p2);
swap(p1,p3);
swap(p2,p3);
}
输入一个三位数,然后由小到大输出
该博客介绍了一个程序设计任务,即如何输入一个三位数并按照从小到大的顺序进行输出。
摘要由CSDN通过智能技术生成