Algorithm
Code Examples
#1 Code Example with C++ Programming
Code -
C++ Programming
#include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
float x, sum = 0;
for(int i = 0; i < n; i++){
cin>>x;
sum += x;
}
float aver = sum / n;
cout<<aver;
}
Copy The Code &
Try With Live Editor
Input
3
50 50 100
50 50 100
Output
66.666666666667
Demonstration
Codeforcess Solution 200-B B. Drinks ,C++, Java, Js and Python,200-B,Codeforcess Solution