Program example_2 Implicit none Integer ::factor,s=0,I Do I=4,8 S=s+factor(i) End do Print*,s End program example_2 例3、输入一个数,判断他是否能被3整除,并输出相应的信息。 Program judge Implicit none Integer :: n,m Read*,n ...
(4) 算术判断:program exampleimplicit nonereal cwrite (*,*) "input a number"read (*,*) cif(c) 10,20,30!10,20和30为行代码,根据c小于/等于/大于0,执行10/20/30行的程10 write (*,*) "A"goto 40!goto可实现跳到任意前面或后面的行代码处,但用多了破坏程序结20 write (*,*) "B"goto ...
Fortran90编程
program example implicit none real c write (*,*) "input a number" read (*,*) c if(c) 10,20,30 !//10,20和30为行代码,根据c小于/等于/大于0,执行10/20/30行的程 10 write (*,*) "A" goto 40 !//goto可实现跳到任意前面或后面的行代码处,但用多了破坏程序结 20 write (*,*) "B...
For example, the Autodice Sample shows how you can use Automation to export Fortran data to Excel. See Section 7.2, “Using the Sample Programs”. For more information, see: excel P r e r e q u i s i t e s f o r I n s t a l l i n g V i s u a l F o r t r ...
简单的FORTRAN90程序分析 PROGRAMEX1!主程序语句[例1]已知一个圆的半径R、高度H,写出计算圆周IMPLICITNONEREAL::R,H,C,S1,S2,S3,V,PI!说明语句长、圆面积、圆柱全面积、圆锥侧面积、圆锥体积PI=3.1415926;R=10.0;H=8.0!赋值语句的程序。!下列语句的作用是计算并赋值C=2*PI*R先给出数学...
山东科技大学《FORTRAN90程序设计》 2.1FORTRAN语言发展概述 u语言地位 ulFORTRAN是英文“FORmulaTRANslator”的缩,译为 u发展历程 u“公式翻译器”,它是世界上最早出现的计算机高级程序 uF90影响 u设计语言,广泛应用于科学和工程计算领域。 FORTRAN语言以其特有的功能在数值、科学和工程计 ...
STDCALL calling mechanisms, causing the stack to become corrupted References to unallocated pointers Attempting to access a protected (for example, read-only) address 3 "forrtl: severe (64): input conversion error, unit 2, file D:\FORTRAN2\testi !文件testi正在读写,直到读写到2时错误。举例:...
For example, the regular Legendre functions on the interval [−1,+1] (cut) (x=cos(θ)) are used as the fundamental angular functions in spherical harmonics which are ubiquitous in atomic and molecular physics and are also used in numerous applications in applied mathematics as spectral ...
write(6,'('' Program write_grid_unst'')')if(CG_BUILD_64BIT)thenwrite(6,'('' ...using 64-bit mode for particular integers'')')end if!! create gridpoints for simple example:ni=21nj=17nk=9iset=0dok=1,nkdoj=1,njdoi=1,niiset=iset+1x(iset)=float(i-1)y(iset)=float(j-1)...