Postlab01_Task2_rfelde

Postlab01_Task2_rfelde - !Age of user REAL :: Days !Days...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
! Lab #1: Introduction to Fortran ! File: Postlab01_Task2_rfelde.f95 ! Date: 15 January 2008 ! By: Ryan Robert Felde ! rfelde ! Section: 02/01, 11:30, and ENAD 138 ! Team: Team Number ! ! ELECTRONIC SIGNATURE ! Ryan Robert Felde ! ! The electronic signature above indicates the program submitted for ! evaluation is my individual work and I have a general understanding ! of all aspects of its development and execution. ! ! A BRIEF DESCRIPTION OF WHAT THE PROGRAM OR FUNCTION DOES ! ! This program asks the user to input their first and last names, their ! current age, and how many days have passed since their last birtday. It ! then calculates their exact age in years and minutes and outputs that ! data with their name. ! PROGRAM age_conversion implicit none CHARACTER(len=20) :: Last_Name !Last name of user CHARACTER(len=20) :: First_Name !First name of user REAL :: Age
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: !Age of user 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' Years_Old = 'years old.' Minutes_Old = 'minutes old.' write(*,*)Last_Name, First_Name write(*,*)You_Are, Age_Year, Years_Old write(*,*)You_Are, Age_Minute, Minutes_Old stop end program...
View Full Document

Page1 / 2

Postlab01_Task2_rfelde - !Age of user REAL :: Days !Days...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online