From 5bb0c34b27ce5f29476bfe87edbf8b717157878a Mon Sep 17 00:00:00 2001 From: bala <13452927+rfgsdhshgfh@user.noreply.gitee.com> Date: Sat, 13 Jan 2024 16:07:29 +0000 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E5=86=92=E6=B3=A1=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E7=AE=97=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: bala <13452927+rfgsdhshgfh@user.noreply.gitee.com> --- ...2\345\272\217\347\256\227\346\263\225.cpp" | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 "2224020152/\347\254\254\345\215\201\345\215\225\345\205\203/\345\256\236\347\216\260\345\206\222\346\263\241\346\216\222\345\272\217\347\256\227\346\263\225.cpp" diff --git "a/2224020152/\347\254\254\345\215\201\345\215\225\345\205\203/\345\256\236\347\216\260\345\206\222\346\263\241\346\216\222\345\272\217\347\256\227\346\263\225.cpp" "b/2224020152/\347\254\254\345\215\201\345\215\225\345\205\203/\345\256\236\347\216\260\345\206\222\346\263\241\346\216\222\345\272\217\347\256\227\346\263\225.cpp" new file mode 100644 index 00000000..b2d30203 --- /dev/null +++ "b/2224020152/\347\254\254\345\215\201\345\215\225\345\205\203/\345\256\236\347\216\260\345\206\222\346\263\241\346\216\222\345\272\217\347\256\227\346\263\225.cpp" @@ -0,0 +1,23 @@ +#include +int main ( ) +{ + + int a[]={3,2,6,4,8,9,1,0,3,5,7,1}; + int len=sizeof(a)/sizeof(int); + + int i=0,j; + for (; ia[j+1]) { + int temp = a[j]; + a[j] = a[j+1]; + a[j+1] = temp; + } + } + } + + for (i=0; i