当前位置:网站首页>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);
}
边栏推荐
- CC2530 common registers for crystal oscillator settings
- [sword finger offer] 58 - I. flip the word order
- visual studio “通常每个套接字地址(协议/网络地址/端口)只允许使用一次“
- MySQL single table field duplicate data takes the latest SQL statement
- Meituan side: why does thread crash not cause JVM crash
- 數據分析必備的能力
- mysql用户管理
- 比亚迪、长城混动市场再“聚首”
- Netease UI automation test exploration: airtest+poco
- Register in PHP_ Globals parameter settings
猜你喜欢

Mysql database -dql

arduino-esp32:LVGL项目(一)整体框架

What is the pledge pool and how to pledge?

NSQ source code installation and operation process

Leetcode: lucky number in matrix

网络安全web渗透技术

PyTorch 1.12发布,正式支持苹果M1芯片GPU加速,修复众多Bug

于文文、胡夏等明星带你玩转派对 皮皮APP点燃你的夏日

Two sides of the evening: tell me about the bloom filter and cuckoo filter? Application scenario? I'm confused..

What material is 13crmo4-5 equivalent to in China? 13crmo4-5 chemical composition 13crmo4-5 mechanical properties
随机推荐
Arduino esp32: overall framework of lvgl project (I)
Why is WPA3 security of enterprise business so important?
New features of C 10
Add color to the interface automation test framework and realize the enterprise wechat test report
What material is sa537cl2 equivalent to in China? Sa537cl2 corresponding material
MySQL single table field duplicate data takes the latest SQL statement
LeetCode 1658. Minimum operand to reduce x to 0
[combinatorics] polynomial theorem (polynomial coefficients | full arrangement of multiple sets | number of schemes corresponding to the ball sub model | polynomial coefficient correlation identity)
arduino-esp32:LVGL项目(一)整体框架
Idea configuration plug-in
LeetCode 1656. Design ordered flow
[Jianzhi offer] 58 - ii Rotate string left
Summary of three methods of PHP looping through arrays list (), each (), and while
Interpretation of several important concepts of satellite antenna
Meituan side: why does thread crash not cause JVM crash
Zebras are recognized as dogs, and Stanford found the reason why AI made mistakes
CC2530 common registers for port interrupts
A survey of state of the art on visual slam
Necessary ability of data analysis
图之深度优先搜索