C Program To Calculate Sum and Average of N Numbers without using Arrays, using For Loop

Publié le: 11 mars 2020
sur la chaîne: Technotip
40,738
395

http://technotip.com/7580/c-program-t...

Write a C program to calculate Sum and Average of N numbers without using Arrays and using for loop.

If limit is 5, then inside for loop we ask the user to input 5 integer values, and we add those values to the previous value present in variable sum. Simultaneously we keep incrementing the value of variable count by 1 for each iteration of for loop. Once the value of variable count is greater than the value of limit, then the control exits for loop. Immediately outside for loop we calculate the average by using the formula:

average = sum / limit;

C Programming Interview / Viva Q&A List
http://technotip.com/6378/c-programmi...

C Programming: Beginner To Advance To Expert
http://technotip.com/6086/c-programmi...


Sur cette page du site, vous pouvez voir la vidéo en ligne C Program To Calculate Sum and Average of N Numbers without using Arrays, using For Loop durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Technotip 11 mars 2020, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 40,738 fois et il a aimé 395 téléspectateurs. Bon visionnage!