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