Advertisement
Guest User

Untitled

a guest
Jan 27th, 2020
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. }
  2. srednia=suma/ile_liczb;
  3.  
  4. for(int a=0; a<ile_liczb; a++)
  5. {
  6.  
  7. sr=abs(srednia-tab[0]);
  8.  
  9. wb=abs(srednia-tab[a]);
  10. if (wb<sr)
  11. sr=tab[a];
  12.  
  13.  
  14.  
  15.  
  16.  
  17. }
  18. cout<<"srednia wynosi: "<<srednia<<endl;
  19. cout<<"zblizona do sredniej: "<<sr<<endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement