Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static int[] NewArray(int age)
- {
- int[] arr = new int[3];
- for (int i = 0; i < arr.Length; i++)
- {
- arr[i] = 0;
- }
- if (age >= 12 && age < 16)
- {
- arr[0]++;
- }
- else if (age >= 16 && age < 18)
- {
- arr[1]++;
- arr[0]++;
- }
- else
- {
- arr[0]++;
- arr[1]++;
- arr[2]++;
- }
- return arr;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement