Fortran F90 不可分类语句(基本)

Fortran F90 Unclassifiable Statement (Basic)

我刚开始在大学学习物理 class 编码,所以我对这一切都很陌生。但是,我找不到我在这方面出错的地方:

! Purpose: Assignment #2
! Author: Rourke Sekelsky
! Date: 9/7/2015

program arith
implicit none ! Turn off implicit typing
real :: x,y ! Define variables
real, parameter :: pi = 3.14159 ! Set the parameter pi

write(*,*) "Enter x:" ! Prompt user to enter their x-value
read(*,*) x ! Read in x-value

y = (3.0*x)+(6.0*pi)((x**3+x**(7.0/2.0)))+11.0/3.0 
! Determine value of function at given x-value

write(*,*) " f(x) = ",y ! Write out the function value

stop ! Stop execution of program
end program arith

编辑:我在 "y = " 部分收到一个无法 class 的语句错误。这个程序不会用 gfortran 编译,我不确定哪里出了问题。如果有帮助就好了,谢谢!

一个字符的错字。您在被乘数之间遗漏了 * 运算符。 y = (3.0*x)+(6.0*pi)*((x**3.0+x**(7.0/2.0)))+11.0/3.0 有效。