Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- class Program
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- double sum = 0;
- double averageWet = 0;
- double daily = 0;
- double[,] arr = new double[n,12];
- for (int i = 0; i < n; i++)
- {
- for (int j = 0; j < 12; j++)
- {
- Console.Write("{0}.Enter value:", j + 1);
- arr[i, j] = double.Parse(Console.ReadLine());
- }
- }
- for (int i = 0; i < n; i++)
- {
- for (int j = 0; j < 12; j++)
- {
- sum += arr[i, j];
- }
- daily = sum / 12;
- averageWet += daily;
- sum = 0;
- }
- averageWet /= n;
- Console.WriteLine("The average wet is: {0}", averageWet);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement