--sas

apr15-file2.c

Apr 15th, 2022
756
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.36 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int x0 = 2;
  4.  
  5. int main() {
  6.     int x1 = 2;
  7.  
  8. #pragma omp parallel shared(x0, x1)
  9.     {
  10.         int x2 = 0;
  11.         static int x3 = 0;
  12.         x0++;
  13.         x1++;
  14.         x2++;
  15.         x3++;
  16.         printf("Par x0 = %d, x1 = %d, x2 = %d, x3 = %d\n", x0, x1, x2, x3);
  17.     }
  18.  
  19.     printf("Seq x0 = %d, x1 = %d\n");
  20.  
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment