int[] createIntArray(int size) {
int[] array = new int[size];
Random rnd = new Random();
for (int i = 0; i < array.Length; i++) {
array[i] = rnd.Next(100, 999);
double[] createDoubleArray(int size) {
double[] array = new double[size];
Random rnd = new Random();
for (int i = 0; i < array.Length; i++) {
array[i] = Math.Round(rnd.NextDouble(), 3);
void countEvenNUmbers(int[] array) {
for (int i = 0; i < array.Length; i++) {
if (array[i] % 2 == 0) count++;
Console.WriteLine("There are no even numbers");
Console.WriteLine("There is 1 even number");
Console.WriteLine("There are {0} even numbers", count);
void sumOddNUmbers(int[] array) {
for (int i = 0; i < array.Length; i++) {
if (i % 2 != 0) sum += array[i];
Console.WriteLine("Sum of odd numbers is {0}", sum);
void sumDoubleArray(double[] array) {
for (int i = 0; i < array.Length; i++) {
Console.WriteLine("Sum numbers of array is {0}", sum);
int[] myIntArray = createIntArray(4);
Console.WriteLine("My integer array is: [{0}]", string.Join(", ", myIntArray));
double[] myDoubleArray = createDoubleArray(4);
Console.WriteLine("My double array is: [{0}]", string.Join(", ", myDoubleArray));
countEvenNUmbers(myIntArray);
sumOddNUmbers(myIntArray);
sumDoubleArray(myDoubleArray);