herrDeng網內搜尋

自訂搜尋

Ads

2012年12月10日 星期一

排序

排序
a[]={10,4,5,8,2,3,7};

57 則留言:

B10033045林仲仁 提到...

public class B10033045a {

static void bubbleSort(int[] data) {
int i,j;
int count=data.length;
int temp;
for (j=count;j>1;j--)
for(i=0;i<j-1;i++)
if (data[i+1]<data[i]){
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}


}
public static void main(String[] args){
int a[]={10,4,5,8,2,3,7};
bubbleSort(a);
for(int i=0;i<=a.length;i++){
System.out.println("a["+i+"]="+(i));

}


}

}

B10033003鍾明修 提到...

import java.io.*;
public class hw1
{
static void BS(int[]data)
{
int i,j;
int count=data.length;
int temp;
for(j=count; j>1; j--)
{
for(i=0; i<j-1; i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args)
{
int a[]={10,4,5,8,2,3,7};
BS(a);
for(int i=0;i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}
}

b10033005 提到...

package p1;
import java.io.*;
public class hw
{
static void bubblesort(int[] data)
{
int j,i;
int count = data.length;
int temp;
for(j =count ; j > 1 ;j--)
{
for(i=0 ; i<j-1; i++)
if(data[i+1]<data[i])
{
temp = data[i+1];
data[i+1] =data[i];
data[i]=temp;
}
}
}
public static void main(String[] args) throws Exception
{
int a[]={10,4,5,8,2,3,7};
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
bubblesort(a);
for(int i=0; i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}
}

B10033057 李長勳 提到...


import java.io.*;
public class hw2 {

static void bubbleSort(int[] data) {
int i,j;
int count= data.length;
int temp;
for (j=count; j>1;j--)
for (i=0;i <j-1;i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
public static void main(String[] args){
int a[]={10,4,5,8,2,3,7};
bubbleSort(a);
for(int i=0;i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}
}

B10033039 鄭明杰 提到...

public class asd {
static void bub(int[] data){
int i,j;
int count=data.length;
int temp;
for(j=count;j>1;j--){
for(i=0;i<j-1;i++)
if(data[i+1]<data[i]){
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args){
int a[]={10,4,5,8,2,3,7};
bub(a);
for(int i=0;i<a.length;i++)
System.out.println(a[i]);
}
}

B10033039 鄭明杰 提到...

public class asd {
static void bub(int[] data){
int i,j;
int count=data.length;
int temp;
for(j=count;j>1;j--){
for(i=0;i<j-1;i++)
if(data[i+1]<data[i]){
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args){
int a[]={10,4,5,8,2,3,7};
bub(a);
for(int i=0;i<a.length;i++)
System.out.println(a[i]);
}
}

b10033019 提到...

public class ast {
static void bub(int[] data){
int i,j;
int count=data.length;
int temp;
for(j=count;j>1;j--){
for(i=0;i<j-1;i++)
if(data[i+1]<data[i]){
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args){
int a[]={10,4,5,8,2,3,7};
bub(a);
for(int i=0;i<a.length;i++)
System.out.print(a[i]);
}
}

B10033052劉悅旻 提到...

public class hello{
static void bub (int[]data){
int i,j;
int count=data.length;
int temp;
for(j=count;j>1;j--){
for(i=0;i<j-1;i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args){
int a[]={10,4,5,8,2,3,7};
bub(a);
for(int i=0;i<a.length;i++)
System.out.println(a[i]);
}
}

B10033027黃盈嘉 提到...

public class hello{
static void bub (int[]data){
int i,j;
int count=data.length;
int temp;
for(j=count;j>1;j--){
for(i=0;i<j-1;i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args){
int a[]={10,4,5,8,2,3,7};
bub(a);
for(int i=0;i<a.length;i++)
System.out.println(a[i]);
}
}

B9813129 林峻葦 提到...

import java.io.*;
public class hw1
{
static void BS(int[]data)
{
int i,j;
int count=data.length;
int temp;
for(j=count; j>1; j--)
{
for(i=0; i<j-1; i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args)
{
int a[]={10,4,5,8,2,3,7};
BS(a);
for(int i=0;i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}
}

B10033025 提到...

import java.io.*;
public class XD
{
static void BS(int[]data)
{
int i,j;
int count=data.length;
int temp;
for(j=count; j>1; j--)
{
for(i=0; i<j-1; i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args)
{
int a[]={10,4,5,8,2,3,7};
BS(a);
for(int i=0;i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}
}

B10033020莊家維 提到...

public class B10033020 {

static void bubbleSort(int[] data) {
int i,j;
int count=data.length;
int temp;
for (j=count;j>1;j--)
for(i=0;i<j-1;i++)
if (data[i+1]<data[i]){
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}


}
public static void main(String[] args){
int a[]={10,4,5,8,2,3,7};
bubbleSort(a);
for(int i=0;i<=a.length;i++){
System.out.println("a["+i+"]="+(i));

}


}

}

B10033044陳威宏 提到...

import java.io.*;
public class hello {

static void bubbleSort(int[] data) {
int i,j;
int count= data.length;
int temp;
for (j=count; j>1;j--)
for (i=0;i <j-1;i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
public static void main(String[] args){
int a[]={10,4,5,8,2,3,7};
bubbleSort(a);
for(int i=0;i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}
}

B10033016 許竣翔 提到...

public class bb16 {
static void bub(int[] data){
int i,j;
int count=data.length;
int temp;
for(j=count;j>1;j--)
{
for(i=0;i<j-1;i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args)
{
int a[]={10,4,5,8,2,3,7};
bub(a);
for(int i=0;i<a.length;i++)
System.out.print(a[i]+"|");
}
}

B10033015 提到...

public class HELLO {

static void bubbleSort(int[] data) {
int i,j;
int count=data.length;
int temp;
for (j=count;j>1;j--)
for(i=0;i<j-1;i++)
if (data[i+1]<data[i]){
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}


}
public static void main(String[] args){
int a[]={10,4,5,8,2,3,7};
bubbleSort(a);
for(int i=0;i<=a.length;i++){
System.out.println("a["+i+"]="+(i));

}


}

}

b10033054 鄭仲軒 提到...

import java.io.*;
public class hw1
{
static void BS(int[]data)
{
int i,j;
int count=data.length;
int temp;
for(j=count; j>1; j--)
{
for(i=0; i<j-1; i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args)
{
int a[]={10,4,5,8,2,3,7};
BS(a);
for(int i=0;i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}
}

B10033026姜禮銘 提到...

public class asd {
static void bub(int[] data){
int i,j;
int count=data.length;
int temp;
for(j=count;j>1;j--){
for(i=0;i<j-1;i++)
if(data[i+1]<data[i]){
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args){
int a[]={10,4,5,8,2,3,7};
bub(a);
for(int i=0;i<a.length;i++)
System.out.println(a[i]);
}
}

B10033048劉雅琪 提到...

public class G
{
static void BS(int[]data)
{
int i,j;
int count=data.length;
int temp;
for(j=count; j>1; j--)
{
for(i=0; i<j-1; i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args)
{
int a[]={10,4,5,8,2,3,7};
BS(a);
for(int i=0;i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}
}

B10033007 蕭雅文 提到...

public class hello{
static void bub (int[]data){
int i,j;
int count=data.length;
int temp;
for(j=count;j>1;j--){
for(i=0;i<j-1;i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args){
int a[]={10,4,5,8,2,3,7};
bub(a);
for(int i=0;i<a.length;i++)
System.out.println(a[i]);
}
}

B10033031游筑雅 提到...

import java.io.*;
public class hw1
{
static void BS(int[]data)
{
int i,j;
int count=data.length;
int temp;
for(j=count; j>1; j--)
{
for(i=0; i<j-1; i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args)
{
int a[]={10,4,5,8,2,3,7};
BS(a);
for(int i=0;i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}
}

B9833108王冠傑 提到...

public class B10033045a {

static void bubbleSort(int[] data) {
int i,j;
int count=data.length;
int temp;
for (j=count;j>1;j--)
for(i=0;i<j-1;i++)
if (data[i+1]<data[i]){
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}


}
public static void main(String[] args){
int a[]={10,4,5,8,2,3,7};
bubbleSort(a);
for(int i=0;i<=a.length;i++){
System.out.println("a["+i+"]="+(i));

}


}

}

B10033034 陳冠錚 提到...

public class hello{
static void bub (int[]data){
int i,j;
int count=data.length;
int temp;
for(j=count;j&gt;1;j--){
for(i=0;i&lt;j-1;i++)
if(data[i+1]&lt;data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args){
int a[]={10,4,5,8,2,3,7};
bub(a);
for(int i=0;i&lt;a.length;i++)
System.out.println(a[i]);
}
}

B10033018張家忠 提到...

import java.io.*;
public class hw1
{
static void BS(int[]data)
{
int i,j;
int count=data.length;
int temp;
for(j=count; j>1; j--)
{
for(i=0; i<j-1; i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args)
{
int a[]={10,4,5,8,2,3,7};
BS(a);
for(int i=0;i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}
}

B10033010賴韋任 提到...

import java.io.*;
public class hw1
{
static void BS(int[]data)
{
int i,j;
int count=data.length;
int temp;
for(j=count; j>1; j--)
{
for(i=0; i<j-1; i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args)
{
int a[]={10,4,5,8,2,3,7};
BS(a);
for(int i=0;i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}
}

B10033006莊松霖 提到...

import java.io.*;
public class hw1
{
static void BS(int[]data)
{
int i,j;
int count=data.length;
int temp;
for(j=count; j>1; j--)
{
for(i=0; i<j-1; i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args)
{
int a[]={10,4,5,8,2,3,7};
BS(a);
for(int i=0;i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}
}

B10033006莊松霖 提到...

import java.io.*;
public class hw1
{
static void BS(int[]data)
{
int i,j;
int count=data.length;
int temp;
for(j=count; j>1; j--)
{
for(i=0; i<j-1; i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args)
{
int a[]={10,4,5,8,2,3,7};
BS(a);
for(int i=0;i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}
}

B10033010賴韋任 提到...

import java.io.*;
public class hw1
{
static void BS(int[]data)
{
int i,j;
int count=data.length;
int temp;
for(j=count; j>1; j--)
{
for(i=0; i<j-1; i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args)
{
int a[]={10,4,5,8,2,3,7};
BS(a);
for(int i=0;i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}
}

B10033032夏瑋駿 提到...

import java.io.*;
public class joe {

static void bubbleSort(int[] data) {
int i,j;
int count= data.length;
int temp;
for (j=count; j>1;j--)
for (i=0;i <j-1;i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
public static void main(String[] args){
int a[]={10,4,5,8,2,3,7};
bubbleSort(a);
for(int i=0;i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}
}


B10033042 提到...

public class hello{
static void bub (int[]data){
int i,j;
int count=data.length;
int temp;
for(j=count;j>1;j--){
for(i=0;i<j-1;i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args){
int a[]={10,4,5,8,2,3,7};
bub(a);
for(int i=0;i<a.length;i++)
System.out.println(a[i]);
}
}

b10033013王彥哲 提到...

import java.io.*;
public class test {
static void BS(int[]data){
int i,j;
int count=data.length;
int temp;
for(j=count; j>1; j--) {
for(i=0; i<j-1; i++)
if(data[i+1]<data[i]) {
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args) {
int a[]={10,4,5,8,2,3,7};
BS(a);
for(int i=0;i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}
}

B10033022梁朝富 提到...

import java.io.*;
public class Hello {
static void bubblesort(int[] data){
int j,i;
int count = data.length;
int temp;
for(j =count ; j > 1 ;j--)
{
for(i=0 ; i<j-1; i++)
if(data[i+1]<data[i])
{
temp = data[i+1];
data[i+1] =data[i];
data[i]=temp;
}
}
}
public static void main(String[] args) throws Exception{
int a[]={10,4,5,8,2,3,7};
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
bubblesort(a);
for(int i=0; i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}
}

B10033002卓孟杰 提到...

public class jas {

static void bubbleSort(int[] data) {
int i,j;
int count=data.length;
int temp;
for (j=count;j>1;j--)
for(i=0;i<j-1;i++)
if (data[i+1]<data[i]){
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}


}
public static void main(String[] args){
int a[]={10,4,5,8,2,3,7};
bubbleSort(a);
for(int i=0;i<=a.length;i++){
System.out.println("a["+i+"]="+(i));

}


}

B10033049 提到...

mport java.io.*;
public class hw1
{
static void BS(int[]data)
{
int i,j;
int count=data.length;
int temp;
for(j=count; j>1; j--)
{
for(i=0; i<j-1; i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args)
{
int a[]={10,4,5,8,2,3,7};
BS(a);
for(int i=0;i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}


}

B10033004 羅時侒 提到...

public class B10033004 {

static void bubbleSort(int[] data) {
int i,j;
int count=data.length;
int temp;
for (j=count;j>1;j--)
for(i=0;i<j-1;i++)
if (data[i+1]<data[i]){
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;

B10033056 陳信吉 提到...

public class B10033056 {

static void bubbleSort(int[] data) {
int i,j;
int count=data.length;
int temp;
for (j=count;j>1;j--)
for(i=0;i<j-1;i++)
if (data[i+1]<data[i]){
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;

B9833084 王綱 提到...

public class b9833084 {

static void bubbleSort(int[] data) {
int i,j;
int count=data.length;
int temp;
for (j=count;j>1;j--)
for(i=0;i<j-1;i++)
if (data[i+1]<data[i]){
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
public static void main(String[] args){
int a[]={10,4,5,8,2,3,7};
bubbleSort(a);
for(int i=0;i<=a.length;i++){
System.out.println("a["+i+"]="+(i));

}
}

}

B9833091陳孟偉 提到...

public class NYPD
{
static void BS(int[]data)
{
int i,j;
int count=data.length;
int temp;
for(j=count; j>1; j--)
{
for(i=0; i<j-1; i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args)
{
int a[]={10,4,5,8,2,3,7};
BS(a);
for(int i=0;i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}
}

B10033035陳雅婷 提到...

public class hello{
static void bub (int[]data){
int i,j;
int count=data.length;
int temp;
for(j=count;j>1;j--){
for(i=0;i<j-1;i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args){
int a[]={10,4,5,8,2,3,7};
bub(a);
for(int i=0;i<a.length;i++)
System.out.println(a[i]);
}
}

b10033009沈哲文 提到...

import java.io.*;
public class hw1
{
static void BS(int[]data)
{
int i,j;
int count=data.length;
int temp;
for(j=count; j>1; j--)
{
for(i=0; i<j-1; i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args)
{
int a[]={10,4,5,8,2,3,7};
BS(a);
for(int i=0;i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}
}

B10033030姜欣宜 提到...

ublic class hello{
static void bub (int[]data){
int i,j;
int count=data.length;
int temp;
for(j=count;j>1;j--){
for(i=0;i<j-1;i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args){
int a[]={10,4,5,8,2,3,7};
bub(a);
for(int i=0;i<a.length;i++)
System.out.println(a[i]);
}
}

B10033041陳奕綺 提到...

public class hello{
static void bub (int[]data){
int i,j;
int count=data.length;
int temp;
for(j=count;j>1;j--){
for(i=0;i<j-1;i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args){
int a[]={10,4,5,8,2,3,7};
bub(a);
for(int i=0;i<a.length;i++)
System.out.println(a[i]);
}
}

B10033050張恩慈 提到...

public class asd {
static void bub(int[] data){
int i,j;
int count=data.length;
int temp;
for(j=count;j>1;j--){
for(i=0;i<j-1;i++)
if(data[i+1]<data[i]){
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args){
int a[]={10,4,5,8,2,3,7};
bub(a);
for(int i=0;i<a.length;i++)
System.out.println(a[i]);
}
}

B10033012 廖經泓 提到...

mport java.io.*;
public class hw1
{
static void BS(int[]data)
{
int i,j;
int count=data.length;
int temp;
for(j=count; j>1; j--)
{
for(i=0; i<j-1; i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args)
{
int a[]={10,4,5,8,2,3,7};
BS(a);
for(int i=0;i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}


}

B10033051 羅宏彬 提到...

import java.io.*;
public class hw1
{
static void BS(int[]data)
{
int i,j;
int count=data.length;
int temp;
for(j=count; j>1; j--)
{
for(i=0; i<j-1; i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args)
{
int a[]={10,4,5,8,2,3,7};
BS(a);
for(int i=0;i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}
}

B10033037 提到...

import java.io.*;
public class hw2 {

static void bubbleSort(int[] data) {
int i,j;
int count= data.length;
int temp;
for (j=count; j>1;j--)
for (i=0;i <j-1;i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
public static void main(String[] args){
int a[]={10,4,5,8,2,3,7};
bubbleSort(a);
for(int i=0;i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}
}

B10033038邵彥銘 提到...

public class abc{
static void bub (int[]data){
int i,j;
int count=data.length;
int temp;
for(j=count;j>1;j--){
for(i=0;i<j-1;i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args){
int a[]={10,4,5,8,2,3,7};
bub(a);
for(int i=0;i<a.length;i++)
System.out.println(a[i]);
}
}

B10033029王德全 提到...

public class abc{
static void bub (int[]data){
int i,j;
int count=data.length;
int temp;
for(j=count;j>1;j--){
for(i=0;i<j-1;i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args){
int a[]={10,4,5,8,2,3,7};
bub(a);
for(int i=0;i<a.length;i++)
System.out.println(a[i]);
}
}

b10033046徐紹桓 提到...

public class aa {

static void bubbleSort(int[] data) {
int i,j;
int count=data.length;
int temp;
for (j=count;j>1;j--)
for(i=0;i<j-1;i++)
if (data[i+1]<data[i]){
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}


}
public static void main(String[] args){
int a[]={10,4,5,8,2,3,7};
bubbleSort(a);
for(int i=0;i<=a.length;i++){
System.out.println("a["+i+"]="+(i));

}


}

}

B10033047 黃鈺翔 提到...

import java.io.*;
public class hw1
{
static void BS(int[]data)
{
int i,j;
int count=data.length;
int temp;
for(j=count; j>1; j--)
{
for(i=0; i<j-1; i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args)
{
int a[]={10,4,5,8,2,3,7};
BS(a);
for(int i=0;i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}
}

b10033040陳姵儒 提到...

public class hello{
static void bub (int[]data){
int i,j;
int count=data.length;
int temp;
for(j=count;j>1;j--){
for(i=0;i<j-1;i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args){
int a[]={10,4,5,8,2,3,7};
bub(a);
for(int i=0;i<a.length;i++)
System.out.println(a[i]);
}
}

B10033011邵怡青 提到...

import java.io.*;
public class shao
{
static void BS(int[]data)
{
int i,j;
int count=data.length;
int temp;
for(j=count; j>1; j--)
{
for(i=0; i<j-1; i++)
if(data[i+1]<data[i])
{
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args)
{
int a[]={10,4,5,8,2,3,7};
BS(a);
for(int i=0;i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}
}

B10033036邱筱婷 提到...

public class a123 {
static void bub(int[] data){
int i,j;
int count=data.length;
int temp;
for(j=count;j>1;j--){
for(i=0;i<j-1;i++)
if(data[i+1]<data[i]){
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args){
int a[]={10,4,5,8,2,3,7};
bub(a);
for(int i=0;i<a.length;i++)
System.out.println(a[i]);
}
}

b00033017 鄭人豪 提到...

package p1;
import java.io.*;
public class hw
{
static void bubblesort(int[] data)
{
int j,i;
int count = data.length;
int temp;
for(j =count ; j > 1 ;j--)
{
for(i=0 ; i<j-1; i++)
if(data[i+1]<data[i])
{
temp = data[i+1];
data[i+1] =data[i];
data[i]=temp;
}
}
}
public static void main(String[] args) throws Exception
{
int a[]={10,4,5,8,2,3,7};
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
bubblesort(a);
for(int i=0; i<a.length;i++)
System.out.println("a["+i+"]="+a[i]);
}
}

B10033028 劉名翔 提到...

B10033028 劉名翔

public class a123 {
static void bub(int[] data){
int i,j;
int count=data.length;
int temp;
for(j=count;j>1;j--){
for(i=0;i<j-1;i++)
if(data[i+1]<data[i]){
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args){
int a[]={10,4,5,8,2,3,7};
bub(a);
for(int i=0;i<a.length;i++)
System.out.println(a[i]);
}
}

B10033028 劉名翔 提到...

B10033028 劉名翔

public class a123 {
static void bub(int[] data){
int i,j;
int count=data.length;
int temp;
for(j=count;j>1;j--){
for(i=0;i<j-1;i++)
if(data[i+1]<data[i]){
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}
}
}
public static void main(String[]args){
int a[]={10,4,5,8,2,3,7};
bub(a);
for(int i=0;i<a.length;i++)
System.out.println(a[i]);
}
}

b10033023賴佳汝 提到...

public class B10033045a {

static void bubbleSort(int[] data) {
int i,j;
int count=data.length;
int temp;
for (j=count;j>1;j--)
for(i=0;i<j-1;i++)
if (data[i+1]<data[i]){
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}


}
public static void main(String[] args){
int a[]={10,4,5,8,2,3,7};
bubbleSort(a);
for(int i=0;i<=a.length;i++){
System.out.println("a["+i+"]="+(i));

}


}

}

B10033053吳貴仁 提到...

public class B10033045a {

static void bubbleSort(int[] data) {
int i,j;
int count=data.length;
int temp;
for (j=count;j>1;j--)
for(i=0;i<j-1;i++)
if (data[i+1]<data[i]){
temp=data[i+1];
data[i+1]=data[i];
data[i]=temp;
}


}
public static void main(String[] args){
int a[]={10,4,5,8,2,3,7};
bubbleSort(a);
for(int i=0;i<=a.length;i++){
System.out.println("a["+i+"]="+(i));

}


}

}

Related Posts Plugin for WordPress, Blogger...

熱門文章