fork download
  1. program C14_date
  2. implicit none
  3. real,parameter::lamda=0.00012097
  4. real::age,percent,ratio
  5. read *,percent
  6. print *,'The remaining carbon14=',percent,'%.'
  7. ratio=percent/100
  8. age=(-1.0/lamda)*log(ratio)
  9. print *,age,'yeqrs.'
  10. end program
Success #stdin #stdout 0.01s 5312KB
stdin
50
stdout
 The remaining carbon14=   50.0000000     %.
   5729.91016     yeqrs.