Back to Browse

C Programming Problem Solutions: Sum and Average of an Array

81 views
Dec 5, 2022
11:19

#average #cprogramming #banglaprogramming #clanguage Find the average of 10 numbers using an array in c programming C Programming: Sum and Average of an Array To find the average of 10 numbers using an array in c programming language, we first need to declare the array. We can do this by using the keyword 'int' followed by the name of the array. In this case, we will call it 'numbers'. The square brackets after the name of the array indicate that it is an array. We then need to fill the array with 10 numbers. These can be any numbers you like. Once the array is filled, we can then use a loop to calculate the average.To calculate the average, we first need to sum all of the numbers in the array. We can do this by using a for loop. The for loop will start at 0 and go up to 9, since there are 10 elements in our array. Inside of the for loop, we will add each element of the array to a variable called 'sum'. Once we have gone through all 10 elements, we will have our sum. To get the average, we simply need to divide sum by 10. This will give us our average of 10 numbers using c programming language. ✅Subscribe to my other channels. A subscriptions from you really means a lot to me. 🔴 Binary Pathshala: https://www.youtube.com/c/binarypathshala 🔴 MH Abid https://www.youtube.com/c/mhabid 🔴 That's Inspiring!: https://www.youtube.com/channel/UCnzpaw192xYBtpkm42ICHjg 🔴 Abid -The Tech Doctor : https://www.youtube.com/channel/UCsjvB1Bm-D-rePu-JDlNn8Q ✅ website: https://www.abidacademy.com ✅Facebook Page: https://www.facebook.com/mh1294/ ✅Facebook Page: https://www.facebook.com/binarypathshala ✅Instagram profile: https://www.instagram.com/mh_1294/ Please comment below your opinion how to do you want us to make video tutorial #average #cprogramming #banglaprogramming #clanguage #onlinecourse #problem #problemsolutions

Download

0 formats

No download links available.