当前位置:网站首页>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);
}
边栏推荐
- MySQL converts comma separated attribute field data from column to row
- Deep understanding of grouping sets statements in SQL
- What is the pledge pool and how to pledge?
- What material is 13crmo4-5 equivalent to in China? 13crmo4-5 chemical composition 13crmo4-5 mechanical properties
- Informatics Olympiad all in one YBT 1175: divide by 13 | openjudge noi 1.13 27: divide by 13
- Daily code 300 lines learning notes day 10
- QT serial port UI design and solution to display Chinese garbled code
- How to delete a specific line from a text file using the SED command?
- [mathematical logic] equivalent calculus and reasoning calculus of propositional logic (propositional logic | equivalent calculus | principal conjunctive (disjunctive) paradigm | reasoning calculus)**
- (补)双指针专题
猜你喜欢

New features of C 10

Threejs Part 2: vertex concept, geometry structure

CC2530 common registers for ADC single channel conversion

Add color to the interface automation test framework and realize the enterprise wechat test report

跟我学企业级flutter项目:简化框架demo参考

CC2530 common registers for serial communication

What is the material of sa302grc? American standard container plate sa302grc chemical composition

What kind of material is 14Cr1MoR? Analysis of chemical composition and mechanical properties of 14Cr1MoR

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

爱可可AI前沿推介(7.3)
随机推荐
MySQL converts comma separated attribute field data from column to row
function overloading
How to set up SVN server on this machine
Difference between JSON and bson
JSON 与 BSON 区别
A survey of state of the art on visual slam
Netease UI automation test exploration: airtest+poco
8个酷炫可视化图表,快速写出老板爱看的可视化分析报告
什么是质押池,如何进行质押呢?
Learn from me about the enterprise flutter project: simplified framework demo reference
Yu Wenwen, Hu Xia and other stars take you to play with the party. Pipi app ignites your summer
[combinatorics] non descending path problem (number of non descending paths with constraints)
Execute script unrecognized \r
14 topics for performance interviews between superiors and subordinates (4)
Arduino esp32: overall framework of lvgl project (I)
BYD and great wall hybrid market "get together" again
[combinatorics] polynomial theorem (polynomial theorem | polynomial theorem proof | polynomial theorem inference 1 item number is the number of non negative integer solutions | polynomial theorem infe
There are several APIs of airtest and poco that are easy to use wrong in "super". See if you have encountered them
Register in PHP_ Globals parameter settings
What is the material of 13mnnimor? 13mnnimor steel plate for medium and low temperature pressure vessels