!学習目的:実数型変数の書式 ! ex104.f a=-1.23 write(*,'(f5.0)') a ! '()'の中で書式を指定 write(*,'(f5.1)') a !最初の5が全カラム数,次の1が小数点以下のカラム数を指定. write(*,'(f5.2)') a write(*,'(f5.3)') a write(*,'(f6.3/)') a ! /は,下に一行空ける write(*,'(e10.0)') a write(*,'(e10.1)') a write(*,'(e10.2)') a write(*,'(e10.3)') a !実行すると-0.123E+01と表示される.最初の10全カラム数,次の3が小数点以下のカラム数を指定.E+1は,10の1乗であることを表す. write(*,'(e10.4)') a write(*,'(e10.5/)') a write(*,'(f5.0,f5.1)') a,a write(*,'(f5.0,10x,f5.1//)') a,a ! 10xは10カラムのスペースを挿入する.//の数だけ空白の行を挿入できる write(*,'(f5.0/f5.1)') a,a ! /は途中にも入れることができる. stop end