Created
June 23, 2018 01:17
-
-
Save hyst3ric41/b09e40f66eb060a7abe77a23a3a3b9d1 to your computer and use it in GitHub Desktop.
This file contains 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; | |
} | |
for(int j=n.length; j>=1; j--){ | |
resultado *= 5; | |
resultado /= 2; | |
} | |
System.out.println("El resultado es: "+resultado); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment