PROGRAM Arithmetic
PROGRAM Arithmetic
!---------------------------------------------------------------------------------
!	John Doe					CPSC 141C					MonthName dd, yyyy
!
!										ASSIGNMENT #1
!	Program to add two real numbersm Variable used are ;
!		X, Y	: the two real numbers
!		Sum	: the sum of X and Y
!
!	Output 	: X, Y and Sum
!---------------------------------------------------------------------------------

IMPLICIT NONE

REAL :: X, Y, Sum

X = 1.234
Y = 5.5
Sum = X + Y

PRINT *, "Sum of", X, " and", y, " is", Sum
pause

End PROGRAM Arithmetic


 
 
 

'노트 > Fortran 연습' 카테고리의 다른 글

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.1. 방사성 물질 감쇠  (0) 2014.03.22
Hello World  (0) 2014.03.04

+ Recent posts