part1b - PROGRAM part1b IMPLICIT NONE REAL:: area, base,...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
!-------------------------------------------------------------------- ! Program Name: Triangle Area Calculation ! Assignment: part1b ! Due Date: Janoary 20, 2010 ! ! Programmer: Alex Pollock Student ID: 000937716 ! Course: CSC-112L (214) Lab TA(s): Colin Moyer ! ! Description: Given a user specified base length and height of a triangle, the !program will calculate the area of the triangle. ! ! Input: Length of the base of the triangle, and the height ! ! Output: Area of the triangle ! ! Assumptions/Limitations: N/A !--------------------------------------------------------------------
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: PROGRAM part1b IMPLICIT NONE REAL:: area, base, height !Ask the user for the length of the base and read into variable base. WRITE(*,*) "Enter the length of the base of your triangle:" READ(*,*) base !Ask the user for the height and read into variable base. WRITE(*,*) "Enter the length of the height of your triangle:" READ(*,*) height !Calculate the area of the triangle. area=1./2.*base*height WRITE(*,*) "The area of your triangle is: ", area END PROGRAM part1b...
View Full Document

Ask a homework question - tutors are online