Advertisement
Holek

Untitled

May 20th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. double moment(int stopien, const vector<double> & t, bool czy_centralny=false){
  2. if(czy_centralny=false) {
  3. int i;
  4. int rozmiar = sizeof(t);
  5. int suma=0;
  6. for(i=0;i<=rozmiar;i++){
  7. suma+=pow(t[i],stopien);
  8. }
  9. suma=suma/rozmiar;
  10. return suma;
  11.  
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement