[ pl4stik @ 09.06.2010. 07:03 ] @
Pozdrav svima, Potrebni su mi zadaci za vezbu od prilike ovako nekako: 1. Write a function that accepts an array of non-negative integers and returns the second largest integer in the array. Return -1 if there is no second largest. The signature of the function is int f(int[ ] a) 2. Write a function that takes an array of integers as an argument and returns a value based on the sums of the even and odd numbers in the array. Let X = the sum of the odd numbers in the array and let Y = the sum of the even numbers. The function should return X - Y The signature of the function is: int f(int[ ] a) 3. Write a function that accepts a character array, a zero-based start position and a length. It should return a character array containing containing length characters starting with the start character of the input array. The function should do error checking on the start position and the length and return null if the either value is not legal. The function signature is: char[ ] f(char[ ] a, int start, int len) Jel ima neko nesto ovako ili slicno? |