diff --git a/2207/C语言同步练习/选择结构/1.c b/2207/C语言同步练习/选择结构/1.c new file mode 100644 index 0000000..fa1fed8 --- /dev/null +++ b/2207/C语言同步练习/选择结构/1.c @@ -0,0 +1,33 @@ +#include + +/* +if(){ + (Ϊʱִ) +}else{ + (Ϊʱִ) +} +*/ +int main(void){ + + int x, y, z, t;//ͱ + // 1, 2; + scanf("%d%d%d", &x, &y, &z); + if(x > y){ + t = x; + x = y; + y = t; + }//ʵxyȽ yλ + if(y > z){ + t = y; + y = z; + z = t; + }//ʵyzȽ zλ zΪ + if(x > y){ + t = x; + x = y; + y = t; + } + printf("%d %d %d\n", x, y, z); + + return 0; +} diff --git a/2207/C语言同步练习/选择结构/1.exe b/2207/C语言同步练习/选择结构/1.exe new file mode 100644 index 0000000..cbb8e18 Binary files /dev/null and b/2207/C语言同步练习/选择结构/1.exe differ diff --git a/2207/C语言同步练习/选择结构/2.c b/2207/C语言同步练习/选择结构/2.c new file mode 100644 index 0000000..e69de29