(1)   Write a Fortran 90 program which does the following:

The user enters a positive integer k and the program calculates the sum of the positive integers from 1 to k.

 

(1)   Find all the errors in the following Fortran 90 program:

 

PROGRAM Find_All_Errors

IMPLICIT NONE

INTEGER :: i, n, count; CHARACTER :: Flag

DoLoop: DO

            PRINT *, "Enter your positive integer"

            READ *, n

            Court = 0 !Initializing count.

            MyDo: DO i=1, n*n

            IF (MOD(i,5)==0)

                        Count = count+1

            END IF MyIF

            END DO DoLoop

            PRINT *, "count= " count

            PRINT *, "Continue? If not, press n or N, else press any other key."

            READ *, flaG

            IF (Flag=="n") .OR. (Flag=="N") THEN

                        EXIT !Quiting the loop and terminating the program.

            END IF

END DO MyDo

END PROGRAM Find_All-Errors

! END of PROGRAM Find_Errors_All