new to coding -- summing question


pachee
08-17-2007, 02:19 PM
i have a long array and i want so sum up pieces of it. So supposing it has x number of rows, want to sum every y number of rows, so sum the first y rows, sum the next y rows, etc. how do i do this? with a counter? i'm a little stuck, everything i code, the sums keep outputting zero....any help would be great. thank you so much.

Feynman
09-10-2007, 08:55 AM
I write a program to beter see the comand goto;
It is a program read a number X , till X is less than 0 then it is invalid, so where is the problem in my code? where is the error?

code:
program GO TO
implicit none
10 print*,'entrer la valeur de X'
read* ,X
IF(X.LT. 0) then
print*,'INvalide'
GO TO 10
else
print*,'valide'
END IF
END