Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Testat01 {
- public static int[] berechne(int[] array) {
- if (array.length % 2 == 0) {
- array[0] *= 3 ;
- array[array.length-1] *= 3 ;
- }
- else {
- return array ;
- }
- for (int i = 1 ; i < array.length - 1 ; i++) {
- array[i] *= 2 ;
- }
- return array ;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement