当前位置:网站首页>写代码将三个整数数按从大到小输出。
写代码将三个整数数按从大到小输出。
2022-07-21 01:18:00 【p29949】
#include <stdio.h>
int main()
{
int a = 2;
int b = 3;
int c = 1;
scanf("%d%d%d",&a, &b,&c);
if(a<b)
{
int tmp = a;
a = b;
b = tmp;
}
if(a<c)
{
int tmp = a;
a = c;
c = tmp;
}
if(b<c)
{
int tmp = b;
b = c;
c = tmp;
}
printf("a=%d b=%d c=%d\n", a, b, c);
return 0;
}
边栏推荐
- 不知道 MySQL 咋学?刷完牛客这 50 道题就够了!(第八篇)
- Network Security Learning (Qianfeng network security notes) 4-- user and group management
- Using zdog to realize JS special effect of outlook lighthouse animation
- MySQL BETWEEN 语法
- 复盘:智能座舱系列文五- 它的3种交互方式之隐式交互
- 登录和注册页面扁平化设计
- Memories of the final examination of information security of the Department of software
- TCP/IP基础
- npm 设置下载源
- Knowledge atlas enables digital economy. The 16th National knowledge atlas and Semantic Computing Conference (CCKS 2022) is about to be held
猜你喜欢
二维数组专题
一条 shell 命令的阻塞与唤醒
Don't know how to learn MySQL? It's enough to finish the 50 questions of Niuke (Chapter 10)
ant.design(简称antd)中时间DatePicker中RangePicker的日期选择限定为只能选择某一天的0点之前的日期
Balancing and scheduling of NuMA
Overview and deployment of redis (master-slave replication, sentinel mode, cluster)
Don't know how to learn MySQL? It's enough to finish the 50 questions of Niuke! (Part VII)
CAD browsing mode and drawing mode, how CAD prints hundreds of drawings at one time
The network cannot be found in the network icon in the lower right corner of the win10 desktop
Explain cache penetration, cache avalanche, cache breakdown
随机推荐
关于swing界面label和button的动态设置文字
Mysql事务日志
使用zdog实现瞭望灯塔动画js特效
Network Security Learning (Qianfeng network security notes) 3 -- batch preparation
map遍历
九. 实战——反射
Resume: smart cockpit series article 3 - the touch of five interactive technologies behind it
CLWY权限管理(六)--- 权限实现
h5手机游戏奔跑吧兔子源码下载
Installation and use tutorial of labelimg (object detection and annotation tool)
2163. Minimum difference of sum after deleting elements [DP + heapq]
Vulnerability mining -thinkphp6.0.12lts deserialization
Flat design of login and registration pages
page-break-before和page-break-after 实现分页打印
IP协议号大全
Answer: intelligent cockpit series article 1, what is it
不知道 MySQL 咋学?刷完牛客这 50 道题就够了!(第七篇)
LabelImg(目标检测标注工具)的安装与使用教程
CLWY权限管理(四)--- 菜单与权限模块
win10桌面右下角网络图标中找不到网络