This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: REAL :: Days !Days since last birthday REAL :: Year !Days in a year REAL :: Age_Year !Age in exact years REAL :: Minutes !Minutes per day REAL :: Age_Minute !Age in Minutes CHARACTER(len=7) :: You_Are CHARACTER(len=12) :: Minutes_old CHARACTER(len=11) :: Years_Old write(*,*) 'Enter your last name:' read(*,*) Last_Name write(*,*) 'Enter your first name:' read(*,*) First_Name write(*,*) 'Enter your age in whole years:' read(*,*) Age write(*,*) 'Enter the days elapsed since your last birthday:' read(*,*) Days Year = 365.242199 Minutes = 1440.0 Age_Year = Age + (Days / Year) Age_Minute = (Minutes * Year) * Age_Year You_Are = 'You are' Minutes_Old = 'minutes old.' Years_Old = 'years old.' write(*,*)Last_Name, First_Name write(*,*)You_Are, Age_Year, Years_Old write(*,*)You_Are, Age_Minute, Minutes_old stop end PROGRAM age_conversion...
View Full Document
This note was uploaded on 10/05/2009 for the course ENGR 117 taught by Professor Staff during the Spring '08 term at Purdue.
- Spring '08
- Computer Programming