Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int s=0, n, m3=0;
- float ma;
- while(n!=0)
- {
- cin>>n;
- if(n%3==0)
- {
- m3++;
- s=s+n;
- }
- }
- ma=s/m3;
- cout<<"Media aritmetica a multiplilor de 3 este: "<<ma;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement