当前位置:网站首页>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);
}
边栏推荐
- Aike AI frontier promotion (7.3)
- Processing strategy of message queue message loss and repeated message sending
- Daily code 300 lines learning notes day 10
- NSQ source code installation and operation process
- CC2530 common registers
- Visual SLAM algorithms: a survey from 2010 to 2016
- [mathematical logic] equivalent calculus and reasoning calculus of propositional logic (propositional logic | equivalent calculus | principal conjunctive (disjunctive) paradigm | reasoning calculus)**
- 跟我学企业级flutter项目:简化框架demo参考
- Overview of satellite navigation system
- On Lagrange interpolation and its application
猜你喜欢

Aike AI frontier promotion (7.3)

utfwry. Dat PHP, about ThinkPHP's method of IP location using utfwry address Library

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

What material is 12cr1movr? Chemical property analysis of pressure vessel steel plate 12cr1movr
智慧之道(知行合一)

Unreal_ Datatable implements ID self increment and sets rowname

What material is sa537cl2 equivalent to in China? Sa537cl2 corresponding material

8 cool visual charts to quickly write the visual analysis report that the boss likes to see

Learn from me about the enterprise flutter project: simplified framework demo reference

CC2530 common registers for crystal oscillator settings
随机推荐
Characteristic polynomial and constant coefficient homogeneous linear recurrence
Fast Ethernet and Gigabit Ethernet: what's the difference?
线程池执行定时任务
word 退格键删除不了选中文本,只能按delete
Central South University | through exploration and understanding: find interpretable features with deep reinforcement learning
CC2530 common registers for ADC single channel conversion
IL Runtime
How to delete a specific line from a text file using the SED command?
Idea configuration plug-in
ucore概述
[Jianzhi offer] 58 - ii Rotate string left
Difference between JSON and bson
Using optimistic lock and pessimistic lock in MySQL to realize distributed lock
utfwry. Dat PHP, about ThinkPHP's method of IP location using utfwry address Library
QT serial port UI design and solution to display Chinese garbled code
[combinatorics] non descending path problem (number of non descending paths with constraints)
关于视觉SLAM的最先进技术的调查-A survey of state-of-the-art on visual SLAM
On Lagrange interpolation and its application
Learn from me about the enterprise flutter project: simplified framework demo reference
【剑指 Offer】58 - II. 左旋转字符串