Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sem sWygenerowane = 0;
- sem sGotowe = 0;
- void WYDRUK(void)
- {
- P(sGotowe);
- printf("c = %d\n", c);
- }
- void OBLICZ(int i)
- {
- int ai = generuj_int();
- P(sWygenerowane);
- c += ai * b[i];
- if (i == n-1)
- V(sGotowe);
- }
- void GENERUJ(void)
- {
- for (int i = 0; i < n; i++) {
- b[i] = generuj_int();
- V(sWygenerowane)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement