Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
18BCE2182 ASSESS_2 Q1
//gcc 7.4.0 #include <stdio.h> #include <stdlib.h> #include <omp.h> int main(int argc, char* argv[]) { int count, cp, i, j; cp=0; int arr[10]; for(i=0; i<10; i++) { arr[i]=rand(); } #pragma omp parallel #pragma omp sections { #pragma omp section { for } for(i=0; i<10; i++) { arr[i]=rand(); count=0; for(j=1; j<=arr[i]; j++) { if(arr[i]%j==0) { count++; } } if(count==2) { cp++; printf("%d is a Prime Number\n",arr[i]); printf("Thread id for number %d is %d",arr[i],omp_get_thread_num()); } } return 0; }
run
|
edit
|
history
|
help
0
A_141117_Primo02
a1
variable arguments 2
C_141210_Funciones
EL PANGRAMA PERFECTO
ayudantia ejercicio 2 numero nashee
X=2
cstructCricket
Binary example
Project 3 Part 1 v1.4