!	Decay Curve generation for any radioactive isotope
!	N(t)=No*exp(-lambda*t)
!	lambda=decay constant= - ln 2 / T
!	T=half-life
!	Program saves output to file:output1
!	This output file can be exported to a plotting routine
!	M. Ragheb univ. of Illinois
!	
	program decay
	real x, lambda
!	This half life is for the tritium 1T3 nucleus
	real :: T = 12.33
	integer :: steps=50
	real ratio(51), time(51)
!	Calculate decay constant
	x = log(2.0)
	lambda = x/T
	write(*,*) x, lambda
!	Open output file
	open(10,file='output1')
!	Calculate ratio N(t)/No
	steps = steps + 1
	do i =  1, steps
		time(i) = i - 1
		ratio(i) = exp (- lambda*time(i))
!	Write results on output file
		write(10,*) time(i), ratio(i)
!	Display results on screen
		write(*,*) time(i), ratio(i)
!		pause
	end do
	end


