Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- using namespace std;
- int main()
- {
- int n, a, cnt=0, M;
- double m=0;
- cin >> n;
- for(int i=1; i<= n; i++)
- {
- cin >> a;
- if(a%2 == 0)
- {
- m+=a;
- cnt ++;
- }
- }
- m /= cnt;
- M = m*100;
- cout << M/100 << '.' << M%100;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement