当前位置:网站首页>27. 输入3个整数,按从大到小的次序输出。要求用指针方法实现。
27. 输入3个整数,按从大到小的次序输出。要求用指针方法实现。
2022-07-03 16:51:00 【我不是萧海哇~~~~】
int sortnum(int *a,int *b ,int *c)
{
int minnum=min(min(*a,*b),*c);
int maxnum=max(max(*a,*b),*c);
int midnum=*a+*b+*c-minnum-maxnum;
printf("%d %d %d\n",maxnum,midnum,minnum);
}
边栏推荐
- Daily code 300 lines learning notes day 10
- [JDBC] API parsing
- Overview of satellite navigation system
- Recommendation of good books on learning QT programming
- Kindeditor editor upload image ultra wide automatic compression -php code
- Preventing/catching “IllegalArgumentException: parameter must be a descendant of this view” error
- 8个酷炫可视化图表,快速写出老板爱看的可视化分析报告
- CC2530 common registers
- A survey of state of the art on visual slam
- Simulink oscilloscope data is imported into Matlab and drawn
猜你喜欢
What material is sa537cl2? Analysis of mechanical properties of American standard container plate
New features of C 10
于文文、胡夏等明星带你玩转派对 皮皮APP点燃你的夏日
What material is 13crmo4-5 equivalent to in China? 13crmo4-5 chemical composition 13crmo4-5 mechanical properties
Unreal_ Datatable implements ID self increment and sets rowname
(补)双指针专题
What is the maximum number of concurrent TCP connections for a server? 65535?
Bcvp developer community 2022 exclusive peripheral first bullet
What material is 12cr1movr? Chemical property analysis of pressure vessel steel plate 12cr1movr
8 cool visual charts to quickly write the visual analysis report that the boss likes to see
随机推荐
PHP production website active push (website)
How to promote cross department project collaboration | community essay solicitation
How to set up SVN server on this machine
Acwing game 58
LeetCode 1657. Determine whether the two strings are close
BYD and great wall hybrid market "get together" again
数据分析必备的能力
JSON 与 BSON 区别
One article takes you to understand machine learning
PHP secondary domain name session sharing scheme
【剑指 Offer】58 - I. 翻转单词顺序
What material is 12cr1movr? Chemical property analysis of pressure vessel steel plate 12cr1movr
QT serial port UI design and solution to display Chinese garbled code
Summary of three methods of PHP looping through arrays list (), each (), and while
Difference between JSON and bson
8 tips for effective performance evaluation
13mnnimo5-4 German standard steel plate 13MnNiMo54 boiler steel 13MnNiMo54 chemical properties
Characteristic polynomial and constant coefficient homogeneous linear recurrence
Atom QT 16_ audiorecorder
Mysql 单表字段重复数据取最新一条sql语句