Fortran

👩‍⚖️Fortran--操作符

2019-03-25  本文已影响0人  YI_YI_
1:加,减,乘,除,乘方
program arithmeticOP
    implicit none
    integer :: a,b,c
    
    a = 5
    b = 3
    
    c = a ** b
    
    print *,"c =",c
    !multiplication
     c = a + b
     print *,"c = ",c
     
     !division
     c = a / b
     print *,"c = ",c
     
     !addition
     c = a + b
     print *,"c = ",c
     
     !subtraction
     c = a - b
     print *,"c =",c
     
    read *
    end program arithmeticOP
     
结果:
result_op.png
上一篇下一篇

猜你喜欢

热点阅读