C#C
C#3y ago
alexhoquan

❔ Trying to find a way so it shows the sum of all the numbers entered and the also the average.

                Modifier votre code Q2 afin de 
                calculer/afficher la somme et la moyenne des nombres saisis
            */
            //inscrire votre code ici
 i = 1;

            while (i < 5)
            {
                Console.WriteLine("Entrer un chiffre ");
                ligne = Console.ReadLine();

                boolok = int.TryParse(ligne, out NbrEntier);
                if (boolok == true)
                {
                    if (NbrEntier <= min)
                    {
                        min = NbrEntier;
                        

                    }
                    i++;
                }

            }
            Console.WriteLine("nombre min : " + min);
            Console.ReadKey();
Was this page helpful?