Advertisement
edutedu

17.09.2018

Sep 16th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. int s=0, n, m3=0;
  2. float ma;
  3. while(n!=0)
  4. {
  5. cin>>n;
  6. if(n%3==0)
  7. {
  8. m3++;
  9. s=s+n;
  10. }
  11. }
  12. ma=s/m3;
  13. cout<<"Media aritmetica a multiplilor de 3 este: "<<ma;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement