2025-02-21

This commit is contained in:
2025-02-21 20:05:39 +08:00
parent a546c2f47c
commit c7ec5eb71f
@@ -1,27 +1,27 @@
#include <stdio.h>
/*
if(条件){
复合语句(条件为真时执行)
if(){
(Ϊʱִ)
}else{
复合语句(条件为假时执行)
(Ϊʱִ)
}
*/
int main(void){
int x, y, z, t;//定义三个整型变量
//数据类型 变量名1, 变量名2;
int x, y, z, t;//ͱ
// 1, 2;
scanf("%d%d%d", &x, &y, &z);
if(x > y){
t = x;
x = y;
y = t;
}//实现x和y比较 大数放y位置
}//ʵxyȽ
if(y > z){
t = y;
y = z;
z = t;
}//实现y和z比较 大数放z位置 z为三个数字中最大数
}//ʵyzȽ
if(x > y){
t = x;
x = y;