From a0bd39af1633b3fa94fa579bb5409012d5a78758 Mon Sep 17 00:00:00 2001 From: patvgnw5f <483018233@qq.com> Date: Thu, 17 Feb 2022 17:07:43 +0800 Subject: [PATCH] =?UTF-8?q?Add=20=E6=8F=92=E5=85=A5=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 插入排序 | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 插入排序 diff --git a/插入排序 b/插入排序 new file mode 100644 index 0000000..cd6ff7f --- /dev/null +++ b/插入排序 @@ -0,0 +1,23 @@ +#include +int main(void) +{ + int a[1001]; + int i,j,t,n; + scanf("%d",&n); + for(i=0;i-1 && a[j]>t;j--) + { + a[j+1]=a[j]; + a[j+1]=t; + + for(j=0;j