Skip to content

Instantly share code, notes, and snippets.

@zrhans
Last active April 25, 2017 20:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zrhans/1b6c98e92e6e2116df1ce5a99edce4b0 to your computer and use it in GitHub Desktop.
Save zrhans/1b6c98e92e6e2116df1ce5a99edce4b0 to your computer and use it in GitHub Desktop.
program op_aritmetica
! Este programa efetua um cálculo aritmético
!
implicit none
! declaração de variáveis
integer :: a, b, c
! atribuindo valores
a = 5
b = 3
! Exponenciação
c = a ** b
! Mostrando o resultado
print *, "c = ", c
! Multiplicação
c = a * b
! resultado
print *, "c = ", c
! Divisão
c = a / b
! resultado
print *, "c = ", c
! Adição
c = a + b
! resultado
print *, "c = ", c
! Subtracão
c = a - b
! resultado
print *, "c = ", c
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment