Last active
May 1, 2020 17:20
-
-
Save sampletext32/591ee6d88fa3ab083c61ca9feddbd51e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace HomeTask1 | |
{ | |
/// <summary> | |
/// Необходимо написать программу эмулирующую защиту выпускных работ. В комиссии присуствуют n экспертов. | |
/// Ваша программа получает строку тему доклада, затем n оценок доклада и выводит среднюю оценку доклада. | |
/// Считывание докладов и подсчет оценок происходит до тех пор, пока не получите команду "Finish". После | |
/// данной комманды выводит средний показатель всех докладов. | |
/// </summary> | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string header = Console.ReadLine(); | |
while (header != "Finish") | |
{ | |
int n = Convert.ToInt32(Console.ReadLine()); | |
float sum = 0; | |
for (int i = 0; i < n; i++) | |
{ | |
int mark = Convert.ToInt32(Console.ReadLine()); | |
sum += mark; | |
} | |
Console.WriteLine(sum / n); | |
header = Console.ReadLine(); | |
} | |
//тут код | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment