© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
44 replies
Jude Thaddaeus

❔ 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();
                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();
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

print out all pairs of natural numbers whose sum isequal to the entered number n
C#CC# / help
3y ago
sum of all numbers in between [Answered]
C#CC# / help
4y ago
sum of all numbers divisible by 3 in a string
C#CC# / help
4y ago
sum of the even numbers in the fibonacci sequence
C#CC# / help
12mo ago