0
点赞
收藏
分享

微信扫一扫

C语言学习记录2

他说Python 2022-10-04 阅读 191

先来晒一晒日落~

C语言学习记录2_#define

将三个数值从小到大排列:

#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
int x, y, z, t = 0;
scanf("%d%d%d", &x, &y, &z);
if (x > y)
{
t = x; x = y; y = t;
}
if (x > z)
{
t = x; x = z; z = t;
}
if (y > z)
{
t = y; y = z; z = t;
}
printf("small to big:%d %d %d", x, y, z);
return 0;
}


举报

相关推荐

0 条评论