1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | C Este programa calcula a m‚dia do semestre com 3 notas Program Media IMPLICIT NONE Real Media_semestre, nota1, nota2, nota3; Print *, "ENTRE COM AS TRÒS NOTAS DO ALUNO" read(*,*) nota1,nota2,nota3 Media_semestre=(nota1+nota2+nota3)/3 C IF (Media_Semestre.GE. 7.0) then IF (Media_semestre >= 7.0) then print * , "aprovado media" else IF (Media_semestre >= 3.0) then print *, "vai para exame" else print * , "reprovado semestre" endif endif print*, nota1,nota2,nota3 C print *, "media do semestre = ", Media_Semestre Print 4, Media_semestre 4 FORMAT (///3X, "MEDIA SEMESTRE = ", f8.4) Stop end program Media |
Direct link: https://paste.plurk.com/show/784541