this is my code im trying to compile it using gcc in my console but the printf dosn’t work if i put in the size
more that 100000
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#define SIZE 1000000
int main() {
double T1[SIZE];
double sum=0;
for (int i = 0; i < SIZE; i++) {
T1[i] = 1.0;
sum += T1[i];
}
printf("la somme est : %6.fn",sum);
return 0;
} ```
result
`PS C:UsersMahdiDocumentsopenmp> gcc -o c -fopenmp c.c
PS C:UsersMahdiDocumentsopenmp> .c
PS C:UsersMahdiDocumentsopenmp> `
`#define SIZE 1000 (less is shown)`
New contributor
EL MAHDI ATMANI is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1