Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5. double zadanie3(int oceny[100], int wagi[100])
  6. {
  7. double srednia, suma=0, sumawagi;
  8. for(int i=0; i<100; i++)
  9. {
  10. suma += oceny[i]*wagi[i];
  11. }
  12. for(int i=0; i<100; i++)
  13. {
  14. sumawagi += wagi[i];
  15. }
  16. srednia = suma/sumawagi;
  17. return srednia;
  18. }
  19.  
  20. int main()
  21. {
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement