Skip to content

Commit c9b469a

Browse files
author
Shruti05-MS
authored
Create test.c
1 parent 92c55a3 commit c9b469a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

openmp/test.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#include <omp.h>
2+
#include <stdio.h>
3+
4+
int main() {
5+
int x = 0;
6+
#pragma omp parallel for
7+
for (int i = 0; i < 10; i++) {
8+
x += i;
9+
}
10+
printf("x = %d\n", x);
11+
return 0;
12+
}

0 commit comments

Comments
 (0)