1、 下面的程序段执行后,a[2]的值为() int[] a=new int[] { 7, 4, 8, 3, 6 }; int n = 5; for(int i=0; i<n-1; i++) { for(int j="0;" j++) if(a[j]> a[j+1]) { int temp=a[j]; a[j]=a[j+1]; a[j+1]=temp; } } }

A.7 B.4 C.3 D.6

时间:2023-09-14 12:54:26

相似题目