Afegir sessió 3 del lab de fenòmens
Change-Id: Ic21d679decc844e3c2899d6da4cca48301dbae0c
diff --git a/quad10/fenomens/lab/p3/writeconfig.f90 b/quad10/fenomens/lab/p3/writeconfig.f90
new file mode 100644
index 0000000..408a168
--- /dev/null
+++ b/quad10/fenomens/lab/p3/writeconfig.f90
@@ -0,0 +1,16 @@
+subroutine WRITECONFIG(S, L)
+ implicit none
+ integer*4, intent(in) :: L
+ integer*2, intent(out) :: S(1:L,1:L)
+ integer*4 :: SEED, i, j
+ real*8 :: genrand_real2
+
+ SEED = 23456
+ call init_genrand(SEED)
+
+ do i = 1, L
+ do j = 1, L
+ S(i, j) = merge(1, -1, genrand_real2() < .5d0)
+ enddo
+ enddo
+end subroutine WRITECONFIG