Advertisement
Guest User

Untitled

a guest
Dec 16th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. sem sWygenerowane = 0;
  2. sem sGotowe = 0;
  3.  
  4. void WYDRUK(void)
  5. {
  6.     P(sGotowe);
  7.     printf("c = %d\n", c);
  8. }
  9.  
  10. void OBLICZ(int i)
  11. {
  12.     int ai = generuj_int();
  13.    
  14.     P(sWygenerowane);
  15.     c += ai * b[i];
  16.    
  17.     if (i == n-1)
  18.         V(sGotowe);
  19. }
  20.  
  21. void GENERUJ(void)
  22. {
  23.     for (int i = 0; i < n; i++) {
  24.         b[i] = generuj_int();
  25.         V(sWygenerowane)
  26.     }
  27.    
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement