This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ejemplo4 { | |
final static byte[] n = { 4, 2, 5, 1, 6, 0, 6, 9, 5, 4, 5, 0 }; | |
static int numero_a_buscar = 1, i = 0; | |
static boolean encontrado = false; | |
public static void main(String[] args) { | |
while(encontrado==false){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ejemplo3 { | |
final static byte[] n = { 4, 2, 5, 1, 6, 0, 6, 9, 5, 4, 5, 0 }; | |
static int resultado = 0; | |
public static void main(String[] args) { | |
for(int i=1; i<=n.length; i++){ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ejemplo2 { | |
final static byte[] n = { 4, 2, 5, 1, 6, 0, 6, 9, 5, 4, 5, 0 }; | |
static int resultado = 0; | |
public static void main(String[] args) { | |
for(int i=1; i<=n.length; i++){ | |
resultado += i; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ejemplo1 { | |
final static byte[] n = { 4, 2, 5, 1, 6, 0, 6, 9, 5, 4, 5, 0 }; | |
static int resultado = 0; | |
public static void main(String[] args) { | |
resultado = (n.length)*8; | |
resultado += 3; |