| |
|
63
|
Programación / Java / Matriz de N dimension, como imprimir vertice inferior derecho ?
|
en: 30 Noviembre 2011, 00:42 am
|
 en el metodo imprimirVerticesMatriz, joderr  , cuanto es 3x3 o 4x4, los imprime , pero si es 3x4 o 5x6 na nay nay  import java.util.*; public class Matriz8 { private Scanner leer; private int[][] matriz; public void cargar() { leer = new Scanner (System. in); int fila = leer.nextInt(); System. out. print("-Columna ? "); int columna = leer.nextInt(); matriz = new int[fila][columna]; for( int f=0; f<matriz.length; f++ ) { for( int c=0; c<matriz[f].length; c++ ) { matriz[f][c] = r.nextInt(10); System. out. println(" Introduce Fila "+(f +1)+" Columna "+(c +1)+": "+matriz [f ][c ]); } } public void matriz() { System. out. println(" MATRIZ "); for( int f=0; f<matriz.length; f++ ) { for( int c=0; c<matriz[f].length; c++ ) { System. out. print(" "+matriz [f ][c ]); } public void imprimirVerticesMatriz() { System. out. println("Vertice Superior Izquierdo "+matriz [0][0]); System. out. println("Vertice Superior Derecho "+matriz [0][matriz. length-1]); System. out. println("Vertice inferior izquierdo "+matriz [matriz. length-1][0]); System. out. println("Vertic inferior derecho "+matriz [matriz. length-1][matriz. length-1]); } public static void main (String []args ) { Matriz8 o = new Matriz8(); o.cargar(); o.matriz(); o.imprimirVerticesMatriz(); } }
|
|
|
|
|
65
|
Programación / Java / matriz nxm numeros, como imprimir segunda fila[SOLUCIONADO]
|
en: 27 Noviembre 2011, 17:48 pm
|
como imprimir la segunda fila de la matriz nxm por ejemplo, sabiendo que no se sabe el tamaño de la matris?  tendré que agregar una clase ?  import java.util.Random; import java.util.Scanner; public class Matriz3 { private Scanner leer; private int matriz[][]; public void cargar() { leer = new Scanner (System. in); System. out. print(" Filas ? "); int fila = leer.nextInt(); System. out. print(" Columnas ? "); int columna = leer.nextInt(); matriz = new int [fila][columna]; for( int f=0; f<matriz.length; f++ ) { for( int c=0; c<matriz[f].length; c++ ) { matriz[f][c] = r.nextInt(10); System. out. println(" Fila "+(f +1)+" Columna "+(c +1)+": "+matriz [f ][c ]); } } public void matriz() { System. out. println(" MATRIZ. "); for( int f=0; f<matriz.length; f++ ) { for( int c=0; c<matriz[f].length; c++ ) { System. out. print(" "+matriz [f ][c ]); } public void primeraFila() { System. out. println(" primera fila "); for( int c=0; c<matriz[0].length; c++ ) { System. out. print(" "+matriz [0][c ]); } public void ultimaFila() { System. out. println(" ultima fila "); for( int c=0; c<matriz[0].length; c++ ) { System. out. print(" "+matriz [matriz. length-1][c ]); } public static void main (String[] args ) { Matriz3 o = new Matriz3(); o.cargar(); o.matriz(); o.primeraFila(); o.ultimaFila(); } }
 me dio bien asi... public void segundaFila() { System. out. println(" segunda fila "); for( int c=0; c<matriz[0].length; c++ ) { System. out. print(" "+matriz [1][c ]); }
|
|
|
|
|
67
|
Informática / Hardware / Armar PC presupuesto actual US$800 no bajara de hay.
|
en: 23 Noviembre 2011, 06:04 am
|
buenas buenas muchachones  ,,, quiero armar un pc, armarlo por amazon Una breve introducción de lo que he tenido que soportar de PC. Y CON ESTA DURE BASTANTE TIEMPO, Y AUN VIVE. http://foro.elhacker.net/overclocking_y_refrigeracion/hola_p_como_prodria_mejorar_el_rendimiento_de_este_pc-t308921.0.html;msg1534234#msg1534234Estudio ing. de sistemas - No soy gamer - No diseño , aunque he usado blender en Xubuntu hize un baño una ves GENIALLL - me gusta usar backtrack, deje de usarlo por falta de recursos, - uso virtual box, - programo en java(lammer XD) - QUERO ARMAR EL PC EN BASE A ESOS US$400 yo opino en comprar - PRIMERO tarjeta madre - SEGUNDO procesador - RAM - FUENTE - Monitor (puedo hacer mas prioridad con la RAM, fuente, monitor. )que me recomiendan de procesador (AMD o INTEL), que tarjeta madre, fuente, RAM tengo un disco duro de 80 gigas IDE, XD que sirve mientras tanto o NO ? http://www.amazon.com/AMD-Athlon-250-Processor-ADX250OCGMBOX/dp/B003Z4PB3O/ref=pd_bxgy_e_text_bhttp://www.amazon.com/Intel-i5-2400S-Processor-Socket-LGA1155/dp/B004EBUXIK/ref=sr_1_4?s=electronics&ie=UTF8&qid=1322023339&sr=1-4MONITOR ALGO ASI , PANTALLA PLANA http://www.amazon.com/Samsung-E1920X-18-5-Inch-Performance-Monitor/dp/B003FU0OCQ/ref=pd_cp_pc_2por los momentos ya he visto algunos enlaces de amazon. ultima NOTICIA, mi hermana me dice para comprarla por chiina. según es mas ECONÓMICO ASUS por amazon $ 209.99 http://www.amazon.com/Asus-P8Z68-V-PRO-ASUS-Motherboard/dp/B00503EA80/ref=pd_bxgy_e_text_cASUS la misma por amazon CHINA ¥ 1 417.40 http://www.amazon.cn/ASUS-%E5%8D%8E%E7%A1%95-Intel-Z68-LGA-1155-P8Z68-V-%E4%B8%BB%E6%9D%BF/dp/B00573NH5K/ref=sr_1_fkmr0_2?s=pc&ie=UTF8&qid=1322058540&sr=1-2-fkmr0saludosss
|
|
|
|
|
68
|
Comunicaciones / Redes / no puedo conectarme por wifi ni modem 3g en win vista sp2
|
en: 19 Agosto 2011, 19:36 pm
|
|
buenas como han estado,,,, tengo un pc de una amiga... en este moment right now... pero segun ella ni a su router se conecta por wifi,,, cosa que antes si lo asía
ahora intento que se conecte a mi modem huawei 3g pero nada de nada...
OPINO ...
el pc esta por lo visto esta en mal estado es WINDOWS VISTA SP2,,, ANTIVIRUZ sin actulizar
detecta las redes , al el modem mio y a otras redes vecinas...
mi modem tiene configuracion
Estado WLAN Nombre (SSID): E583X-7896 Difusión del SSID: Activado Usuario actual WiFi: 5 cifrado: WPA-PSK cifrado WPA: TKIP
en el windows vista sale detectada la red Y PONGO todo eso correctamente junto con clave
ahora en el windows sale es WPA2-PERSONAL WPA-PERSONAL WPA2-ENTERPRISE WPA-ENTERPRISE
WPA-PERSONAL eso es los mismo que WPA-PSK ? YO ESCOJI WPA-PERSONAL,,,
EN ESTE momento dice conectado a mi modem,,, pero sigo sin inter
en el cmd con un ipconfig sale una ip parecida a una ip publica con mascara de subred,,, y sin puerta de enlace
en las demas pc del modem les da una ip local con su puerta de enlace 192.168.1.1 pero en esta de mi amigita no...
saluD.O.S
|
|
|
|
|
70
|
Programación / Java / Como agregar un arreglo de tipo persona en un Archivo en java.
|
en: 30 Marzo 2011, 06:09 am
|
buenas noches gente buenisima miren tengo una duda. como puedo agregar un arreglo de tipo persona en un archivo tengo esto import java.io.*; public class EscribirArchivo { public static void main (String [] args ) { try { archivo = new FileWriter("C:\\Documents and Settings\\Presentaciones\\Escritorio\\archivo.txt "); pw.println("Esta linea dice..."); e.printStackTrace(); } finally { try{ if(null != pw) { pw.close(); } } e2.printStackTrace(); } } } }
osea hago mi arreglo , y en que parte lo agrego ,creo que no es asi nada mas. ejemplo como agrego esto ? me falta crear el array tipo persona claro no puedo declarar clases dentro de metodos.  import java.util.Scanner; public class Persona { private int edad; private int sexo; return this.nombre; } public void setNombre (String n ) { this.nombre = n; } return this.apellido; } public void setApellido (String a ) { this.apellido = a; } public int getEdad() { return this.edad; } public void setEdad(int e) { this.edad = e; } public int getSexo() { return this.sexo; } public void setSexo(int sexo) { this.sexo = sexo; } public static void main (String[] args ) { } }
|
|
|
|
|
|
| |
|