2025-02-21
This commit is contained in:
@@ -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位置
|
||||
}//ʵ��x��y�Ƚ� ������yλ��
|
||||
if(y > z){
|
||||
t = y;
|
||||
y = z;
|
||||
z = t;
|
||||
}//实现y和z比较 大数放z位置 z为三个数字中最大数
|
||||
}//ʵ��y��z�Ƚ� ������zλ�� zΪ���������������
|
||||
if(x > y){
|
||||
t = x;
|
||||
x = y;
|
||||
|
||||
Reference in New Issue
Block a user