当前位置:网站首页>27. Input 3 integers and output them in descending order. Pointer method is required.
27. Input 3 integers and output them in descending order. Pointer method is required.
2022-07-03 16:56:00 【I'm not Xiao Haiwa~~~~】
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);
}
边栏推荐
- What is the material of sa302grc? American standard container plate sa302grc chemical composition
- (补)双指针专题
- MySQL single table field duplicate data takes the latest SQL statement
- 香港理工大学|数据高效的强化学习和网络流量动态的自适应最优周界控制
- RF analyze demo build step by step
- What material is 12cr1movr? Chemical property analysis of pressure vessel steel plate 12cr1movr
- Golang anonymous function use
- Top k questions of interview
- Netease UI automation test exploration: airtest+poco
- 网络安全web渗透技术
猜你喜欢

聊聊接口优化的几个方法

【Try to Hack】主动侦查隐藏技术

What is the material of 13mnnimor? 13mnnimor steel plate for medium and low temperature pressure vessels

美团一面:为什么线程崩溃崩溃不会导致 JVM 崩溃

Kotlin学习快速入门(7)——扩展的妙用

Analysis of variance summary

斑馬識別成狗,AI犯錯的原因被斯坦福找到了

Recommendation of good books on learning QT programming

What material is sa537cl2? Analysis of mechanical properties of American standard container plate

Thread pool executes scheduled tasks
随机推荐
【剑指 Offer】58 - II. 左旋转字符串
Visual studio "usually, each socket address (Protocol / network address / port) can only be used once“
LeetCode 1657. Determine whether the two strings are close
CC2530 common registers for ADC single channel conversion
What is the material of 13mnnimor? 13mnnimor steel plate for medium and low temperature pressure vessels
JSON 与 BSON 区别
Le zèbre a été identifié comme un chien, et la cause de l'erreur d'AI a été trouvée par Stanford
ucore概述
Idea configuration plug-in
CC2530 common registers for watchdog
Two sides of the evening: tell me about the bloom filter and cuckoo filter? Application scenario? I'm confused..
Mysql database DDL and DML
LeetCode 1656. Design ordered flow
What material is 12cr1movr? Chemical property analysis of pressure vessel steel plate 12cr1movr
Simulink oscilloscope data is imported into Matlab and drawn
Top k questions of interview
[combinatorics] recursive equation (characteristic equation and characteristic root | example of characteristic equation | root formula of monadic quadratic equation)
Recommendation of good books on learning QT programming
Kotlin学习快速入门(7)——扩展的妙用
線程池:業務代碼最常用也最容易犯錯的組件