티스토리 뷰
PROGRAM Half_Adder !--------------------------------------------------------------------------------- ! Program to calculate the outputs from a logical circuit that ! Represents a binary half-adder. Variables used are: ! A, B : the two logical inputs to the circuit ! Sum, Carry : the two logical outputs ! ! Input : The two logical inputs A and B ! Output : The two logical outputs Sum and Carry, which represent the ! sum and carry that result when the input values are added !--------------------------------------------------------------------------------- IMPLICIT NONE LOGICAL :: A, B, Sum, Carry PRINT *, "Enter logical inputs A and B:" READ *, A, B Sum = (A .OR. B) .AND. .NOT. (A .AND. B) Carry = A .AND. B PRINT *, "Carry, Sum =", Carry, Sum pause End PROGRAM Half_Adder
'노트 > Fortran 연습' 카테고리의 다른 글
Program 4.1. 곱셈표의 출력 (0) | 2014.04.27 |
---|---|
Program 3.4. 오염지수 3 (0) | 2014.04.06 |
Program 3.3. 오염지수 2 (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
- 충남대학교 경제학과
- 한국천문연구원
- 충남대
- 충남대 홍성표
- 홍성표
- 티스토리 초대권
- 경제학과 홍성표
- 초대장
- 양구
- 한국은행 통화정책 경시대회
- 홍성표 교수
- 충주충일중학교
- 키워드
- 대전
- 학점 계산기
- 검색량
- wwe
- 티스토리 초대
- 충남대학교 경제학과 30주년 기념
- 충주대원고등학교
- 함성
- 아동 학대
- 티스토리
- 괴산
- 네이버
- Presentation Ice Breaker
- 경제학 홍성표
- 충남대학교
- 충주
- 티스토리 초대장
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함