2024-06-21
This commit is contained in:
28
Writerside/topics/IO.md
Normal file
28
Writerside/topics/IO.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# 표준 입출력
|
||||
|
||||
```fortran
|
||||
program stdio
|
||||
implicit none
|
||||
|
||||
character(len=16) :: name
|
||||
|
||||
read (*,*) name
|
||||
print *, 'Hello, ', name
|
||||
end program stdio
|
||||
```
|
||||
|
||||
## 표준 출력
|
||||
|
||||
화면에 출력할 때에는 `print`를 사용합니다.
|
||||
|
||||
```fortran
|
||||
print *, 'Hello, ', name
|
||||
```
|
||||
|
||||
## 표준 입력
|
||||
|
||||
키보드로부터 입력을 받을 때에는 `read`를 사용합니다.
|
||||
|
||||
```fortran
|
||||
read (*,*) name
|
||||
```
|
||||
Reference in New Issue
Block a user