Docsity

Math 248: Interactive Fortran 90 Program for User Input and Output - Prof. Charles Pruett, Assignments of Mathematics

Toggle sidebar
bg1
Math 248 Computers and Numerical Algorithms
Spring 2009–Pruett
Programming Assignment 1 (10 points)
DATE ASSIGNED: Tuesday, 20 January, 2009
DATE DUE: 4:00 p.m. Monday, 26 January, 2009
Write a simple interactive Fortran 90 program that queries the operator for certain information
and then prints that information to the screen. To be specific, the program should prompt the
operator to enter the following:
1. last name, first name, and middle initial (in this order)
2. a 5-digit fictitious student ID number
3. an age
4. a favorite musical performer or group
Items 1 and 4 should be read as character data. Item 2 should be read as an integer (beginning
with a non-zero digit). Item 3 should be read as a real number (including a decimal part to represent
the fraction of a year). Name information should be printed out in the following order: first, MI,
last. Note this is different than the order in which the data are input.
The variables should be appropriately named, and the program should contain a short preamble
that contains at least the following information: 1) the purpose of the program, 2) the name of the
author, and 3) those from whom you received help and the nature thereof. The program should also
be well structured, with comments where appropriate. For more details on structured programming
requirements see the guidelines posted on the course website.
Turn in a hard copy of the source code and sample output by the due date.
HONOR CODE: You are to do this assignment solo. As always, you are allowed to discuss
programming issues with other students, but the actual coding of your program should be accom-
plished individually, and your program should be unique. Only pledged programs will be accepted.
Suggestion: add the comment JMU PLEDGE to the preamble, and sign beside it before turning in
your final version.

Partial preview of the text

Download Math 248: Interactive Fortran 90 Program for User Input and Output - Prof. Charles Pruett and more Assignments Mathematics in PDF only on Docsity!

Math 248 Computers and Numerical Algorithms

Spring 2009–Pruett

Programming Assignment 1 (10 points)

DATE ASSIGNED: Tuesday, 20 January, 2009

DATE DUE: 4:00 p.m. Monday, 26 January, 2009

Write a simple interactive Fortran 90 program that queries the operator for certain information and then prints that information to the screen. To be specific, the program should prompt the operator to enter the following:

  1. last name, first name, and middle initial (in this order)
  2. a 5-digit fictitious student ID number
  3. an age
  4. a favorite musical performer or group

Items 1 and 4 should be read as character data. Item 2 should be read as an integer (beginning with a non-zero digit). Item 3 should be read as a real number (including a decimal part to represent the fraction of a year). Name information should be printed out in the following order: first, MI, last. Note this is different than the order in which the data are input.

The variables should be appropriately named, and the program should contain a short preamble that contains at least the following information: 1) the purpose of the program, 2) the name of the author, and 3) those from whom you received help and the nature thereof. The program should also be well structured, with comments where appropriate. For more details on structured programming requirements see the guidelines posted on the course website.

Turn in a hard copy of the source code and sample output by the due date.

HONOR CODE: You are to do this assignment solo. As always, you are allowed to discuss programming issues with other students, but the actual coding of your program should be accom- plished individually, and your program should be unique. Only pledged programs will be accepted. Suggestion: add the comment JMU PLEDGE to the preamble, and sign beside it before turning in your final version.