herrDeng網內搜尋
自訂搜尋
Ads
訂閱:
張貼留言 (Atom)
熱門文章
-
11!=?
-
計算你上學期加權平均
-
計算你的BMI
-
int a[]={21, 23, 57, 13 ,17, 6}; float average; average=?
-
輸出字串20次
-
猜數字
-
1. 利用遞迴input n算2^n 2. 用C算GCD(3333,456)
-
C字串練習 字串 char word[]="You win!"; 輸出為: You win! You win You wi You w You You Yo Y 給進階使用者: gets () 是個危險的函式!
51 則留言:
import java.util.Arrays;
public class weerw {
public static void main(String[] args) {
int[] x=new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(100);
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class hi {
public static void main(String[] args) {
int [] x= new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(100);
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+")="+x[i]);
}
}
import java.util.*;
public class ex1 {
public static void main(String[] args) {
int [] x= new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class ex1 {
public static void main(String[] args) {
int [] x= new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(100);
System.out.println("x["+i+"="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"="+x[i]);
}
}
}
import java.util.*;
public class ex1 {
public static void main(String[] args) {
int [] x= new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class ex1 {
public static void main(String[] args) {
int [] x= new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(100);
System.out.println("x["+i+"="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"="+x[i]);
}
}
}
import java.util.*;
public class ex1 {
public static void main(String[] args) {
int [] x=new int[20];
Random rnd=new Random();
for(int i=0; i<x.length;i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length;i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
public static void main(String[] args) {
int [] x=new int[20];
Random rnd=new Random();
for(int i=0;i<x.length;i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]"+x[i]);
}
Arrays.sort(x);
System.out.println("排序後");
for(int i=0;i<x.length;i++){
System.out.println("x["+i+"]"+x[i]);
}
}
}
import java.util.*;
public class Hi {
public static void main(String[] args) {
int[] x=new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
D10333033 江淑婷
import java.util.*;
public class hi {
public static void main(String[] args) {
int [] x= new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class java {
public static void main(String[] args) {
int [] x=new int[20];
Random rnd=new Random();
for(int i=0;i<x.length; i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0;i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class ex2 {
public static void main(String[] args) {
int [] x=new int[20];
Random rnd=new Random();
for(int i=0;i<x.length; i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0;i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class HI0608 {
public static void main(String[] args) {
int [] x= new int[20];
Random rnd=new Random();
for(int i=0;i<x.length; i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.Arrays;
import java.util.Random;
public class hello0608 {
public static void main(String[] args) {
int[] x= new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
資管一甲 Y10310066 陳昤瑄
import java.util.*;
public class qwe {
public static void main(String[] args) {
int[]x=new int[20];
Random rnd=new Random();
for (int i=0; i<x. length;i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+")="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length;i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class badboy {
public static void main(String[] args) {
int[] x=new int[20];
Random rnd =new Random();
for(int i=1; i<x.length;i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+
"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length;i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class ex1 {
public static void main(String[] args) {
int [] x= new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(100);
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
D10333034 洪芷茵
import java.util.*;
public class hi {
public static void main(String[] args) {
int [] x= new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class java {
public static void main(String[] args) {
int [] x=new int[20];
Random rnd=new Random();
for(int i=0;i<x.length; i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0;i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class tx1 {
public static void main(String[] args) {
int[] x=new int[20];
Random rnd=new Random();
for(int i=0; i<x.length;i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length;i++){
System.out.println("x["+i+"="+x[i]);
}
}
}
import java.util.*;
public class tx1 {
public static void main(String[] args) {
int[] x=new int[20];
Random rnd=new Random();
for(int i=0; i<x.length;i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length;i++){
System.out.println("x["+i+"="+x[i]);
}
}
}
import java.util.Arrays;
import java.util.Random;
public class ex1 {
public static void main(String[] args) {
int [] x= new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後");
for(int i=0; i<x.length; i++) {
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class Fanny {
public static void main(String[] args) {
int[] x=new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class ex1 {
public static void main(String[] args) {
int [] x= new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class ex1 {
public static void main(String[] args) {
int [] x= new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
D10333010 柯羿瑄
import java.util.Arrays;
import java.util.Random;
public class JAVA1234 {
public static void main(String[] args) {
int[] x =new int[20];
Random rnd=new Random();
for(int i=0; i<x.length;i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for (int i=0; i<x.length;i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class hi {
public static void main(String[] args) {
int [] x= new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
package ex1;
import java.util.*;
public class d10033301 {
public static void main(String[] args){
int[] x =new int[20];
Random rnd = new Random();
for (int i=0;i<x.length;i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後=");
for (int i=0;i<x.length;i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class qwe {
public static void main(String[] args) {
int [] x= new int [20];
Random rnd=new Random();
for(int i=0; i<x. length;i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.Arrays;
import java.util.Random;
public class D10333028 {
public static void main(String[] args) {
int [] x= new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class hoor {
public static void main(String[] args) {
int[]x=new int[20];
Random rnd=new Random();
for(int i=0; i=0; i--){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.Arrays;
import java.util.Random;
public class D10333028 {
public static void main(String[] args) {
int [] x= new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
package d10033203;
import java.util.*;
public class a12345 {
public static void main(String[] args) {
int[] x= new int[20];
Random rnd =new Random();
for(int i=0; i<x.length;i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length;i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class b12345 {
public static void main(String[] args) {
int [] x=new int[20];
Random rnd =new Random();
for(int i=0;i<x.length; i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length;i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
package d10033203;
import java.util.*;
public class a12345 {
public static void main(String[] args) {
int[] x= new int[20];
Random rnd =new Random();
for(int i=0; i<x.length;i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length;i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class ex2 {
public static void main(String[] args) {
int [] x=new int[20];
Random rnd=new Random();
for(int i=0;i<x.length; i++){
do{
x[i]=rnd.nextInt(100);
}while(x[i]%2!=1);
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0;i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class hello {
public static void main(String[] args) {
int [] x= new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(50);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class hello0608 {
public static void main(String[] args) {
int [] x= new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class hello123 {
public static void main(String[] args) {
int [] x= new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class YOYO {
public static void main(String[] args) {
int [] x= new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(50);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class ex2 {
public static void main(String[] args) {
int [] x= new int[20];
Random rnd =new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
private static int Random(int i, int j) {
// TODO Auto-generated method stub
return 0;
}
}
import java.util.Arrays;
public class weerw {
public static void main(String[] args) {
int[] x=new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
public static void main(String[] args) {
int [] x=new int[20];
Random rnd=new Random();
for(int i=0;i<x.length;i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]"+x[i]);
}
Arrays.sort(x);
System.out.println("排序後");
for(int i=0;i<x.length;i++){
System.out.println("x["+i+"]"+x[i]);
}
}
import java.util.*;
public class Fanny {
public static void main(String[] args) {
int[] x=new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(50);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class java {
public static void main(String[] args) {
int [] x=new int[20];
Random rnd=new Random();
for(int i=0;i<x.length; i++){
x[i]=rnd.nextInt(50);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0;i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class ex1 {
public static void main(String[] args)
{
ArrayList tmp = new ArrayList();
ArrayList num = new ArrayList();
for (int i=1;i<100;i+=2)
tmp.add(new Integer(i));
Collections.shuffle(tmp);
System.out.println(tmp.subList(0,19));
for (int i=0;i<20;i++)
num.add(tmp.get(i));
Collections.sort(num);
System.out.println(num.subList(0,19));
}
}
import java.util.*;
public class NINI {
public static void main(String[] args) {
int [] x=new int[20];
Random rnd=new Random();
for(int i=0; i<x.length;i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後");
for(int i=0; i<x.length;i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.Arrays;
public class weerw {
public static void main(String[] args) {
int[] x=new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(100);
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class hi {
public static void main(String[] args) {
int [] x= new int[20];
Random rnd=new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(100);
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+")="+x[i]);
}
}
package D10333038;
import java.util.*;
public class Hey {
public static void main(String[] args) {
int[] x= new int[20];
Random rnd =new Random();
for(int i=0; i<x.length;i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後:");
for(int i=0; i<x.length;i++){
System.out.println("x["+i+"]="+x[i]);
}
}
}
import java.util.*;
public class ex2 {
public static void main(String[] args) {
int [] x= new int[20];
Random rnd =new Random();
for(int i=0; i<x.length; i++){
x[i]=rnd.nextInt(49);
x[i]=2*x[i]+1;
System.out.println("x["+i+"]="+x[i]);
}
Arrays.sort(x);
System.out.println("排序後");
for(int i=0; i<x.length; i++){
System.out.println("x["+i+"]="+x[i]);
}
}
private static int Random(int i, int j) {
// TODO Auto-generated method stub
return 0;
}
}
張貼留言