Bingo

También podría gustarte

Está en la página 1de 1

TRABAJO DE PROGRAMACIN NOMBRE: CARLOS AUCAPIA FECHA: 20/05/2013 NIVEL: SEGUNDO SISTEMASA INGENIERO: ALVARO SVCHEZ VISUALIZAR NUMEROS

EXTRAIDOS DE UNA TOMBOLA EN UN JUEGO DE BINGO DEL 1-90. import java.util.*; public class bingo { static int j,i,p; public static void tombola () { int vec[]=new int [90]; i=0; vec[i]=(int)(Math.random()*(90-1+1)+1); for( i=1;i<=89;i++){ vec[i]=(int)(Math.random()*(90-1+1)+1); for( j=0;j<i;j++) { if(vec[i]==vec[j]){ i--; } } } System.out.println ("LOS NUMEROS GANADORES SON:-->>"); for( p=0;p<=89;p++) System.out.print (" "+vec[p]); } public static void main(String[] args) { tombola(); }}

También podría gustarte