guys, tried to compile a program to calculate student's GPA but am having this error during compilation. script of the program and error generated are here below, thanks.
! program to calculate student GPA grade implicit none integer :: no_of_courses real :: grade_point_obtain=0.0, G_P_A=0.0 real :: A=5, B=4, C=3, D=2, E=1, F=0, total=0.0 integer :: course, credit, grade real, dimension[:], allocatable :: subject real, dimension[:], allocatable :: credit real, dimension[:], allocatable :: grade print*, 'enter number of courses offered' read*, no_of_courses allocate(subject(1:no_of_courses)) do course=1,no_of_courses print*, 'type in the course code, credit_load and grade for each subject', course read*, subject(course), credit(course), grade(course) total=total+credit(course) enddo do A=70,100 print*, A enddo do B=60,69 print*, B enddo do C=50,59 print*, C enddo do D=45,49 print*, D enddo do E=40,44 print*, E enddo do F=0,39 print*, F enddo grade_point_obtain=credit(course)grade(course) G_P_A=grade_point_obtain/total print, 'the total credit_load is', total print*, 'the total grade_point_obtain is', grade_point_obtain print*, 'your GPA is', G_P_A
end
error:
C:\project7\STUDENT GPA.F95(27) : warning 1091 - Using a floating point loop variable may give unexpected results due to rounding errors C:\project7\STUDENT GPA.F95(30) : warning 1091 - Using a floating point loop variable may give unexpected results due to rounding errors C:\project7\STUDENT GPA.F95(33) : warning 1091 - Using a floating point loop variable may give unexpected results due to rounding errors Compilation failed.
having error on this now;
do A=70,100 print*, A enddo do B=60,69 print*, B enddo do C=50,59 print*, C enddo do D=45,49 print*, D enddo do E=40,44 print*, E enddo do F=0,39 print*, F enddo