Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- int nr=0,s=0,x,y;
- cin>>x>>y;
- if(x%2==0)
- {
- s=2*x;
- nr=2;
- }
- while(x!=y)
- {
- if(y%2==0)
- {
- s=s+y;
- nr++;
- }
- cin>>y;
- }
- cout<<float s/nr<<" "<<nr;
- }
Add Comment
Please, Sign In to add comment