tugas3-openMP/no_reduction.f90

15 lines
295 B
Fortran
Raw Permalink Normal View History

2022-11-14 14:26:50 +07:00
program summ
implicit none
integer :: sum = 0
integer :: n
!$OMP parallel do
do n = 0, 1000
sum = sum + n
print*, n, " ", sum
end do
!$OMP end parallel do
print*, " "
print*, " "
print*, " "
print*, "hasilnya adalah ", sum
end program summ