MATH
posted by EDWIN on .
WRITE A SIMPLE BUT A COMPLETE FORTRAN PROGRAM TO COMPUTE THE AVERAGE OF SIX NUMBERS AND DISPLAY THE NUMBERS, SUM AND AVVERAGE. THE PROGRAM SHOULD TERMINATE WHEN ZERO IS ENTERED AS A NUMBER. THE PROGRAM SHOULD BE EDUCATIVE

Program math
Integer:num1,num2,num3,num4,num5,num6,sum,averag
Write (*,*)'enter six numbers'
Read (*,*) num1, num2, num3, num4, num5, num6
Sum = num1+num2+num3+num4+num5+num6
Average = sum / 2
Write (*,*)'the sum is ',sum
Write (*,*)'the average is', average 
Program math
Integer:num1,num2,num3,num4,num5,num6,sum,averag
Write (*,*)'enter six numbers'
Read (*,*) num1, num2, num3, num4, num5, num6
Sum = num1+num2+num3+num4+num5+num6
Average = sum / 2
Write (*,*)'the sum is ',sum
Write (*,*)'the average is', average 
PROGRAM SMILE
Real:: A, B, C, D, E, F,SUM,AVE
WRITE (*,*) 'ENTER THE NUMBERS'
READ(*,*) A, B, C, D, E, F
IF (A = 0) .OR. (B = 0) .OR. (C=0) .OR. (D = 0) .OR. (E = 0) .OR. (F = 0) THEN
END
ELSE
SUM= A+B+C+D+E+F
AVE= SUM/6
ENDIF
WRITE (*,*) 'THE SUM IS ', SUM, 'AND AVERAGE IS ', AVE
END