热门

最新

红包

立Flag

投票

同城

我的

发布
uesowys
计算机科技研究员
5 年前
trueuesowys

A new record is ordered first and then is inserted into the appropriate position of some range so that new transaction must wait for the old transaction to finish inserting before some index record of range.

CSDN App 扫码分享
分享
评论
1
打赏
  • 复制链接
  • 举报
下一条:
选择排序#include<stdio.h>void sort(int a[],int n);int main(){ int a[10]; int i; for(i=0; i<10; i++) scanf("%d",&a[i]); sort(a,10); for(i=0; i<10; i++) printf("%-2d",a[i]); return 0;}void sort(int a[],int n){ int i,j,t; for(i=0; i<n-1; i++) { for(j=i+1; j<n; j++) { if(a[j]<a[i]) { t=a[i]; a[i]=a[j]; a[j]=t; } } }}
立即登录