In the main program I need to make two arrays and put some numbers in them like I did. Alright so the problem is with subprogram: it's supposed to return array with those numbers I used in the main program arrays. (in this case 1, 2, 3 & 5) How do I do it?
So:
- Code: Select all
public class TaulukotYhteen
{
static void Main(string[] args)
{
int[] t1, t2;
t1 = new int[2] { 1, 2 };
t2 = new int[2] { 3, 5 };
Leikkaa(t1,t2);
}
public static int Leikkaa(int[] t1, int[] t2)
{
int[] t3 = new int[t1 + t2]; ?!?!?!
x
x
return t3;
}
}






