Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- boolean b[] = new boolean[10];
- int arr[] = arr1;
- int darr[] = arr2;
- int tk = 0;
- int c = 0;
- boolean flag = false;
- while(!flag)
- for(int i = 0; i < arr.length - 1; i++) {
- b[i] = false;
- if(arr[i] % darr[i] == 0)
- {
- b[i] = true;
- tk++;
- }
- if(++c >= 5) flag = !flag;
- }
- arr1 = {3, 9, 8, 2, 1, -1, 7, 9, -4, 10};
- arr2 = {1, 9, 2, 2, 6, 3, 9, 1, 9, 5};
- Trovare i valori di b[], c e tk.
- Soluzioni:
- b[] = true, true, true, true, false, false, false, true, false
- c = 9
- tk = 5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement