All pastes #2079026 Raw Edit

Miscellany

public java v1 · immutable
#2079026 ·published 2011-08-29 22:35 UTC
rendered paste body
import java.util.Random;public class Ordenacao_mais_aleatorio {	public static void main(String[] args) {		Random Numero_Aleatorio = new Random();		int[] v = new int[1000];		for(int i = 0; i < v.length; i++) {		v[i] = Numero_Aleatorio.nextInt(10000);		}		for(int i = 0; i < v.length; i++) {			for(int j = i+1; j < v.length; j++) {				if(v[i] > v[j]) {					int aux = v[i];					v[i] = v[j];					v[j] = aux;				}			}		}		for(int i = 0; i < v.length; i++) {			System.out.println(v[i]);		}	}}