pseudo kod v tramvaji na koleni v tabletu
static void Main(string[] args)
{
string matej = "Matěj";
double[] matejZnamky = { 3, 5, 1, 3, 2 };
string honza = "Honza";
double[] honzaZnamky = { 1, 1, 1, 5, 4 };
}
static void PrumerZnamek(string studentName1, double[] student1Arr, string studentName2, double[] student2Arr)
{
double avarage1 = avarage(student1Arr);
double avarage2 = avarage(student2Arr);
if(avarage1 > avarage2){
//dopln si
} else if (avarage1 < avarage2){
//dopln si
} else {
//dopln si
}
}
static double avarage(double[] arr) {
double tmp = 0;
for(int i = 0; i < arr.Count(); i++) {
tmp += arr[i];
}
return tmp / arr.Count();
}
PS: c# neumim/nedelam