Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class UnAltreProgramaMisterios {
- public static final int[] array = {1, 6, 4, 8, 3, 7, 3, 6, 9, 4, 2, 9, 6};
- public static void main(String[] args) {
- int i = array.length - 1;
- int resultat = 0;
- while(i > (array.length / 2)) {
- if (array[i] == 4) {
- resultat--;
- } else {
- resultat++;
- }
- }
- System.out.println("El resultat Ês " + resultat + ".");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement