tried to run a program but having this error, pls help me out!
C:\projects\job1.F95(10) : error 199 - Array RAINFALL appears in this expression as rank 1, but was declared as rank 2 C:\projects\job1.F95(13) : error 199 - Array RAINFALL appears in this expression as rank 1, but was declared as rank 2 Compilation failed.
here is the program:
implicit none real :: Total=0.0, Average=0.0 real, Dimension(1,12) :: RainFall integer :: Month print*, 'type in the rainfall values' print*, 'one per line' do Month=1,12 read*, RainFall(Month) enddo do Month=1,12 Total=Total+RainFall(Month) enddo Average=Total/12 print*, 'Average monthly rainfall was' print*, Average
end