'Completa le righe "DATA" in modo da ottenere una tabella con le frequenze '(assolute o percentuali) della possibili uscite (X,Y). Metti in nx e ny il 'numero dei valori che possono assumere le variabili casuali X e Y (ossia il 'n. delle colonne e il n. delle righe). Il programma costruisce nel directory 'indicato in PERCORSO$ il file isto.prs (per il programma 3D) che rappresenta 'l'istogramma di distribuzione di (X,Y). Al momento e' impostato il directory 'corrente; e X e' il settore occupazionale (1-ario,2-ario,3-ario), Y e' il 'sesso (M,F); le frequenze sono in milioni riferite al 1991. percorso$ = "./" nx = 3 ny = 2 DIM fr(nx, ny) DATA 1.17,5.26,7.68 DATA 0.66,1.66,5.18 max1 = nx: IF ny > nx THEN max1 = ny tot = 0 FOR i = 1 TO ny: FOR j = 1 TO nx READ fr(j, i): tot = tot + fr(j, i) NEXT: NEXT max = 0 FOR i = 1 TO ny: FOR j = 1 TO nx fr(j, i) = fr(j, i) * 100 / tot IF fr(j, i) > max THEN max = fr(j, i) NEXT: NEXT molt = 1 IF max / max1 > 2 THEN molt = INT(max / max1) max = INT(max + .5) OPEN percorso$ + "isto.prs" FOR OUTPUT AS #1 PRINT #1, "L="; max1 * molt PRINT #1, "D=2" PRINT #1, "O="; -nx * 5 * molt; ","; ny * 5 * molt; ","; max * 4 PRINT #1, "M="; nx / 2 * molt; ","; ny / 2 * molt; ","; max / 2 FOR i = 1 TO nx: FOR j = 1 TO ny IF i > 1 OR j > 1 THEN PRINT #1, "s" k = i + 1 color$ = RIGHT$(STR$(k - (k \ 6) * 6), 1) PRINT #1, "c1" + color$ if fr(i,j)>0 then d1=0.15:d2=0.85 else d1=0.4:d2=0.6 WRITE #1, (i - d2) * molt, (j - d2) * molt, 0 WRITE #1, (i - d1) * molt, (j - d2) * molt, 0 WRITE #1, (i - d1) * molt, (j - d1) * molt, 0 WRITE #1, (i - d2) * molt, (j - d1) * molt, 0 WRITE #1, (i - d2) * molt, (j - d2) * molt, 0 WRITE #1, (i - d2) * molt, (j - d2) * molt, fr(i, j) WRITE #1, (i - d1) * molt, (j - d2) * molt, fr(i, j) WRITE #1, (i - d1) * molt, (j - d1) * molt, fr(i, j) WRITE #1, (i - d2) * molt, (j - d1) * molt, fr(i, j) WRITE #1, (i - d2) * molt, (j - d2) * molt, fr(i, j) PRINT #1, "s" WRITE #1, (i - d1) * molt, (j - d2) * molt, 0 WRITE #1, (i - d1) * molt, (j - d2) * molt, fr(i, j) PRINT #1, "s" WRITE #1, (i - d1) * molt, (j - d1) * molt, 0 WRITE #1, (i - d1) * molt, (j - d1) * molt, fr(i, j) PRINT #1, "s" WRITE #1, (i - d2) * molt, (j - d1) * molt, 0 WRITE #1, (i - d2) * molt, (j - d1) * molt, fr(i, j) NEXT NEXT CLOSE