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;
- namespace ConsoleApp41
- {
- class Program
- {
- static void Main(string[] args)
- {
- double av = 0, sum = 0;
- double[,] array = new double[6, 4];
- int i, j, br = 0;
- for (i = 0; i < 6; i++)
- for (j = 0; j < 4; j++)
- array[i, j] = double.Parse(Console.ReadLine());
- for (i = 0; i < 6; i++)
- {
- for (j = 0; j < 4; j++)
- Console.Write(array[i, j] + " ");
- Console.WriteLine();
- }
- //a
- for (i = 0; i < 6; i++)
- {
- if (array[i, 3] >= 5.50)
- br++;
- }
- Console.WriteLine("br na otLichnicite e : " + br);
- //b
- br = 0;
- for (i = 0; i < 6; i++)
- {
- if (array[i, 1] >= 160)
- br++;
- }
- Console.WriteLine("za otbora po basket sa : " + br);
- //c
- br = 0;
- for (i = 0; i < 6; i++)
- {
- if (array[i, 2] >= 65 && array[i, 0] >=11)
- br++;
- }
- Console.WriteLine("za otbora po borba sa : " + br);
- //d
- br = 0;
- for (i = 0; i < 6; i++)
- for (j = 0; j < 4; j++)
- {
- if (array[i, 0] == 9 || array[i, 0] == 10)
- {
- sum = sum + array[i, 1];
- br++;
- }
- av = sum / br;
- }
- Console.WriteLine("av = " + av);
- br = 0;
- //e
- for (i = 0; i < 6; i++)
- for (j = 0; j < 4; j++)
- {
- br = 0;
- if (array[i, 0] == 10 || array[i, 0] == 11 && array[i, 1] >=170 && array[i, 2] <=70)
- {
- br++;
- }
- }
- Console.WriteLine("furbolen otbor = " + br);
- }
- }
- }
- /*
- 9
- 160
- 60
- 5,55
- 10
- 165
- 66
- 4,51
- 9
- 155
- 54
- 3,85
- 11
- 166
- 65
- 4,49
- 12
- 175
- 80
- 5,50
- 11
- 180
- 82
- 3,75
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement