Přidat otázku mezi oblíbenéZasílat nové odpovědi e-mailem Úkol

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

Reakce na odpověď

1 Zadajte svou přezdívku:
2 Napište svou odpověď:
3 Pokud chcete dostat ban, zadejte libovolný text:

Zpět do poradny