diff --git a/c5.md b/c5.md new file mode 100644 index 0000000..e292cc9 --- /dev/null +++ b/c5.md @@ -0,0 +1,4 @@ +int Ascending(float a, float b) +{ + return a < b; // 这样比较决定了按升序排序,如果a b; +} \ No newline at end of file diff --git a/c7.md b/c7.md new file mode 100644 index 0000000..8dbf3db --- /dev/null +++ b/c7.md @@ -0,0 +1,7 @@ +void SwapFloat(float *x, float *y) +{ +float temp; +temp = *x; +*x = *y; +*y = temp; +} \ No newline at end of file diff --git a/c8.md b/c8.md new file mode 100644 index 0000000..68f1b39 --- /dev/null +++ b/c8.md @@ -0,0 +1,7 @@ +void SwapLong(long *x, long *y) +{ +long temp; +temp = *x; +*x = *y; +*y = temp; +} \ No newline at end of file