Advertisement
Guest User

Laboratory work 3,2

a guest
Nov 9th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.22 KB | None | 0 0
  1. #include <iostream.h>
  2. #include <math.h>
  3. void main()
  4. {
  5. int a,n,i,k=0;
  6. double s=0;
  7. cout<<"\nEnter n";
  8. cin>>n;
  9. for(i=1;i<=n;i++)
  10. {
  11. cout<<"\nEnter a";
  12. cin>>a;
  13. s+=a;k++;
  14. }
  15. s=s/k;
  16. cout<<"\nSr. arifm="<<s<<"\n";
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement