情報活用資料-03-20150604



Similar documents
Fortran90/95 [9]! (1 ) " " 5 "Hello!"! 3. (line) Fortran Fortran 1 2 * (1 ) 132 ( ) * 2 ( Fortran ) Fortran ,6 (continuation line) 1

Microsoft Word - 資料 docx

情報活用資料

Microsoft Word - 資料 (テイラー級数と数値積分).docx

Microsoft Word - 03-数値計算の基礎.docx

pdf軽_台紙まとめ県民

合併後の交付税について


n 第1章 章立ての部分は、書式(PC入門大見出し)を使います

ٽ’¬24flNfix+3mm-‡½‡¹724

2 3

11042 計算機言語7回目 サポートページ:

OpenMP¤òÍѤ¤¤¿ÊÂÎó·×»»¡Ê£±¡Ë

untitled

Z...QXD (Page 1)

コンピュータ概論

2002.N.x.h.L g9/20

OpenMP¤òÍѤ¤¤¿ÊÂÎó·×»»¡Ê£±¡Ë

文庫●注文一覧表2016c(7月)/岩波文庫

PowerPoint プレゼンテーション

橡00horse.PDF

( )

WATCH

WATCH

tebiki00.dvi

untitled

2

2 / 37


人事行政の運営状況等の公表(平成19年12月)(PDF)


A

2

76 3 B m n AB P m n AP : PB = m : n A P B P AB m : n m < n n AB Q Q m A B AQ : QB = m : n (m n) m > n m n Q AB m : n A B Q P AB Q AB 3. 3 A(1) B(3) C(

untitled

ネットショップ・オーナー2 ユーザーマニュアル

EPSON エプソンプリンタ共通 取扱説明書 ネットワーク編

ありがとうございました

EPSON エプソンプリンタ共通 取扱説明書 ネットワーク編

公務員人件費のシミュレーション分析

198


新婚世帯家賃あらまし

/9/ ) 1) 1 2 2) 4) ) ) 2x + y 42x + y + 1) 4) : 6 = x 5) : x 2) x ) x 2 8x + 10 = 0


PSCHG000.PS

X Window System X X &

2 key. 3

num2.dvi

2 1 Octave Octave Window M m.m Octave Window 1.2 octave:1> a = 1 a = 1 octave:2> b = 1.23 b = octave:3> c = 3; ; % octave:4> x = pi x =

2 (4)-7

3. :, c, ν. 4. Burgers : u t + c u x = ν 2 u x 2, (3), ν. 5. : u t + u u x = ν 2 u x 2, (4), c. 2 u t 2 = c2 2 u x 2, (5) (1) (4), (1 Navier Stokes,.,

™n”¿…j…–†[…X0705„”“ƒ

MultiWriter5150/5140 ユーザーズガイド

DE-6001 取扱説明書



GNU Emacs GNU Emacs

UX-V503CL/UX-V503CW

Compiled MODELSでのDFT位相検出装置のモデル化と評価


第4回 小平市の文化振興を考える市民委員会

Transcription:

cp hello.f90 echo.f90 mv echo.f90 echofile.f90 cp echofile.f90 echo.f90 7

8

9

Echo key input program echo character(80):: A read (5,*) A write (6,*) A stop end program echo chracter read 10

Echo key input to file program echo2file character(80):: A open (10,file='outfile.dat') read (5,*) A write (10,*) A stop end program echo2file open write open (10,file='outfile.dat',status='new') 11

volume of rotating ellipsoid program ellips implicit none real(4):: a, b, pi, v write (6,*) 'input equatorial radius a (km)' read (5,*) a write (6,*) 'input polar radius b (km)' read (5,*) b pi = 4.0e0 * atan(1.0e0) a = a * 1.0e3 write (6,*) 'a =',a,'m' b = b * 1.0e3 write (6,*) 'b =',b,'m' v = 4.0 / 3.0 * pi * a**2 * b write (6,*) 'The volume is',v,'m^3' stop end program ellips implicit none 12

implicit real*4 (a-h,o-z) implicit integer (i-n) Real(4)::(4) (4) real pi=4.0e0*atan(1.0e0) 4.0e0 atan a = a * 1.0e3 v = 4.0e0 / 3.0e0 * pi * a**2 * b a**2 13

type of numerical variables program type1 implicit none real(4):: a1,a2 real(8):: da1,da2 integer:: i a1 = 4.0e0*atan(1.0e0) da1 = 4.0d0*atan(1.0d0) da2 = dble(a1) i = int(a1) a2 = float(i) write (6,*) 'a1 =', a1 write (6,*) 'da1 =', da1 write (6,*) 'da2 =', da2 write (6,*) 'i =', i write (6,*) 'a2 =', a2 stop end program type1 real*8 *8 double precision integer 14

da1=4.0d0*atan(1.0d0)4.0d0 da2 = dble(a1)dble sngl( ) i = int(a1) a2 = float(i)real( ) dfloat( ) 15

integer devide by real or integer variable program type2 implicit none real(4):: a,b,c,d,e,f,g,h integer:: i,j,k i = 5 j = 3 k = 2 watch out the automatic type transfomation a = float(i)/float(j) b = i/j c = float(i/j) d = i*j/k e = i/k*j f = i/k*float(j) g = float(i)/k*j write (6,*) 'a,b,c =', a,b,c write (6,*) 'd,e write (6,*) 'f,g =', d,e =', f,g stop end program type2 16

e = i*j/k e = float(i*j/k) 17

+ c = a+b - c = a-b c = -a * c = a*b / c = a/b ** c = a**2 c = a*a () f = a*((b+c)*d+e) int(x) float(i) dfloat(i) sngl(x) dble(x) sin(x) acos(x) tanh(x) sqrt(x) log(x) log10(x) exp(x) abs(x) mod(x,y) min(x,y) max(x,y) cp file_a file_b cp file1 file2 directoryname 18

cp directoryname/filename. filename *? mv file_a file_b mv file1 file2 directoryname rm file1 file2 *(アスタリスク)? cp *.f directoryname rm * http://ace.phys.h.kyoto-u.ac.jp/~tomita/education/fortran90/sec0.html http://www.mri-jma.go.jp/project/mrinpd/coderule.html 19

20