当前位置:网站首页>ZZULIOJ:1020: 两整数排序
ZZULIOJ:1020: 两整数排序
2022-08-10 03:39:00 【追上】
1020: 两整数排序
时间限制: 1 Sec 内存限制: 30 MB
[状态] [讨论版] [提交] [命题人:admin]
题目描述
从键盘输入两个整数x,y,按从小到大的顺序输出它们的值。
输入
输入两个整数x,y。
输出
按从小到大的顺序输出它们的值。数据之间以空格间隔。
样例输入 Copy
20 16
样例输出 Copy
16 20
参考代码
#include <stdio.h>
#include <math.h>
int main()
{
int x, y;
scanf("%d %d", &x, &y);
if(x>y)
printf("%d %d", y, x);
else
printf("%d %d", x, y);
return 0;
}
边栏推荐
猜你喜欢
How to quickly become a software test engineer?What skills do testers need for a monthly salary of 15k?
Flutter 如何安装 pub.dev 上的 package
Mini Program Navigation and Navigation Parameters
同样是初级测试,凭什么他比我薪资高 5000 块?
【科研绘图】琴图 +箱型图混合 matplotlib库和seabsorn库的使用
Small program subcontracting and subcontracting pre-download
软件测试这些基本类型你知道吗?
Shell 文本三剑客 awk
goland console shows overlapping problem solution
leetcode-218.天际线问题
随机推荐
leetcode-218.天际线问题
Neo4J 与 Cypher 查询语言基础
自定义训练,使用Generator dataset迭代数据报错
长沙:借网红的风,铺长红的路
Small program subcontracting and subcontracting pre-download
ThreedLocal在单线程中的应用【获取在拦截器中登录的用户信息】
wind7 无法安装tools (问题已解决)
Dynamic Web Development Fundamentals
Dijkstra求最短路
Spark面试问题总结
Software life cycle (the work of each phase of software engineering)
day17正则表达式作业
Pytorch中的torch.index_select对应MindSpore哪个方法
Mini Program Navigation and Navigation Parameters
leetcode 283:移动零
暑假第三周总结博客 - 五种传值方式
TCP协议之《TCP_CORK选项》
The so-called software testing ability is actually these 5 points
树的介绍、树的定义和基本术语、二叉树的定义和性质、二叉树的顺序表示与实现和链式表示与实现以及树的遍历方法以及两种创建方式
C语言顺序表(源码)