当前位置:网站首页>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 watchdog
- Mysql database -dql
- On Lagrange interpolation and its application
- 关于学习Qt编程的好书精品推荐
- [Jianzhi offer] 57 - ii Continuous positive sequence with sum s
- 線程池:業務代碼最常用也最容易犯錯的組件
- Pytorch 1.12 was released, officially supporting Apple M1 chip GPU acceleration and repairing many bugs
- Execute script unrecognized \r
- [combinatorial mathematics] recursive equation (example of recursive equation 2 Hanoi Tower | example of recursive equation 3 insertion sequencing)
- IDEA-配置插件
猜你喜欢
What material is sa537cl2 equivalent to in China? Sa537cl2 corresponding material
Idea configuration plug-in
消息队列消息丢失和消息重复发送的处理策略
CC2530 common registers for timer 1
CC2530 common registers for serial communication
Arduino esp32: overall framework of lvgl project (I)
word 退格键删除不了选中文本,只能按delete
utfwry. Dat PHP, about ThinkPHP's method of IP location using utfwry address Library
Daily code 300 lines learning notes day 10
于文文、胡夏等明星带你玩转派对 皮皮APP点燃你的夏日
随机推荐
Static program analysis (I) -- Outline mind map and content introduction
How to promote cross department project collaboration | community essay solicitation
网络安全web渗透技术
Overview of satellite navigation system
Golang decorator mode and its use in NSQ
LeetCode 1658. Minimum operand to reduce x to 0
mysql用户管理
What material is sa537cl1? Sa537cl1 corresponds to the national standard material
Prepare for the golden three silver four, 100+ software test interview questions (function / interface / Automation) interview questions. win victory the moment one raises one 's standard
手把手带你入门 API 开发
建立自己的网站(23)
Data driving of appium framework for mobile terminal automated testing
[combinatorics] non descending path problem (number of non descending paths with constraints)
What material is sa537cl2 equivalent to in China? Sa537cl2 corresponding material
The most complete postman interface test tutorial in the whole network, API interface test
(补)双指针专题
斑馬識別成狗,AI犯錯的原因被斯坦福找到了
What is the maximum number of concurrent TCP connections for a server? 65535?
Le zèbre a été identifié comme un chien, et la cause de l'erreur d'AI a été trouvée par Stanford
Svn usage specification