티스토리 뷰
PROGRAM Pollition_2 !--------------------------------------------------------------------------------- ! Program that reads 3 pollution levels, calculates a pollution ! Index as their integer average, and then displays an appropriate ! air-quality message. Identifiers used are: ! Level_1, Level_2, Level_3 : the three pollution levels ! LowCutoff, HighCutoff : cutoff values that distinguish ! between good/fair, and fair/poor ! conditions, respectively ! Index : the integer average of the pollution levels ! ! Input : The three pollution levels and the cutoff value ! Constant : The two cutoff values ! Output : The pollution index and a "good condition" message if ! this index is less than LowCcutoff, a "fair condition" ! message if it is between LowCutoff and HighCutoff, ! and a "poor condition" message otherwise !--------------------------------------------------------------------------------- IMPLICIT NONE INTEGER :: Level_1, Level_2, Level_3, Index INTEGER, PARAMETER :: LowCutoff = 25, HighCutoff = 50 ! Get the 3 pollution readings PRINT *, "Enter 3 pollution readings (parts per million):" READ *, Level_1, Level_2, Level_3 ! Classify the pollution index and display an appropriate ! air-quality message IF (Index < LowCutoff) THEN PRINT *, "Good condition" ELSE IF (Index < HighCutoff) THEN PRINT *, "Poor condition" END IF pause End PROGRAM Pollition_2
'노트 > Fortran 연습' 카테고리의 다른 글
Program 4.1. 곱셈표의 출력 (0) | 2014.04.27 |
---|---|
Program 3.5. 이진 반가수기 (0) | 2014.04.06 |
Program 3.4. 오염지수 3 (0) | 2014.04.06 |
Program 3.2. 오염지수 (0) | 2014.04.06 |
Program 3.1. 이차 방정식 (0) | 2014.04.06 |
Program 2.Exercise6.2. 온도 변환 (2nd Version) (0) | 2014.03.23 |
Program 2.Exercise6.1. 온도 변환 (1st Version) (0) | 2014.03.23 |
Program 2.Exercise5 (0) | 2014.03.23 |
Program 2.1. 발사체 문제 (0) | 2014.03.22 |
Program 1.Exercise10 (0) | 2014.03.22 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 괴산
- 티스토리
- 네이버
- 경제학과 홍성표
- 한국천문연구원
- 충남대학교 경제학과 30주년 기념
- 대전
- 충남대학교
- 양구
- 충주
- 함성
- 충남대
- 아동 학대
- 티스토리 초대권
- 초대장
- Presentation Ice Breaker
- 홍성표
- 한국은행 통화정책 경시대회
- 검색량
- 충남대학교 경제학과
- 경제학 홍성표
- 충주대원고등학교
- 충남대 홍성표
- 티스토리 초대
- wwe
- 홍성표 교수
- 키워드
- 학점 계산기
- 티스토리 초대장
- 충주충일중학교
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함