Skip to content

Instantly share code, notes, and snippets.

@hyst3ric41
Created June 23, 2018 01:17
Show Gist options
  • Save hyst3ric41/b09e40f66eb060a7abe77a23a3a3b9d1 to your computer and use it in GitHub Desktop.
Save hyst3ric41/b09e40f66eb060a7abe77a23a3a3b9d1 to your computer and use it in GitHub Desktop.
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