Docsity

CSCI 230 Assignment 02: Modifying a FORTRAN Program for Selective Execution, Assignments of Computer Science

Toggle sidebar
bg1
CSCI 230 Assignment 02 Due: 09/14/06 (3rd Week)
Fall-2006 (50 pts)
(http://www.cs.niu.edu/~sjchung)
Chapter 3: Selective Execution
1. Type in Figure 3.6 (Pay Calculation, p.145 of the text)
and save the program as Prog02.for in your F drive.
2. Modify Prog02.for so that it will execute until EmType is >N=.
3. Compile & Link/Edit Prog02.for to get Prog02.obj and Prog02.exe.
4. Type in the following lines and save them as Prog02.in:
>S=
40000
>S=
60000
>S=
80000
>H=
30.0 10.00
>H=
40.0 10.00
>H=
50.0 10.00
>H=
60.0 10.00
>N=
5. Run Prog02.exe by:
C:\>Prog02 < Prog02.in > Prog02.out <Enter>
6. Display the output by:
C:\>Edit Prog02.out <Enter>
7. Your Prog02.out should compare correctly to Prog02.sjc (in the Course Web Page).
Modify (and correct) your program until your Prog02.out shows the correct results.
8. Hand in:
1) Printed copies of your Prog02.for and Prog02.out
C:\>copy prog02.for LPT1 <Enter>
C:\>copy prog02.out LPT1 <Enter>
2) Your 3.5" diskette containing your Prog02.for, Prog02.obj, Prog02.exe, and Prog02.out.
a) Place your 3.5" diskette into A drive, then
b) C:\>copy prog02.* a: <Enter>
pf2

Partial preview of the text

Download CSCI 230 Assignment 02: Modifying a FORTRAN Program for Selective Execution and more Assignments Computer Science in PDF only on Docsity!

CSCI 230 Assignment 02 Due: 0 9 / 14 /06 (3rd Week)

Fall- 2006 ( 5 0 pts)

(http://www.cs.niu.edu/~sjchung)

Chapter 3: Selective Execution

  1. Type in Figure 3.6 (Pay Calculation, p.145 of the text) and save the program as Prog02.for in your F drive.
  2. Modify Prog02.for so that it will execute until EmType is >N=.
  3. Compile & Link/Edit Prog02.for to get Prog02.obj and Prog02.exe.
  4. Type in the following lines and save them as Prog02.in:

    S= 40000 S= 60000 S= 80000 H= 30 .0 10. 00 H= 4 0.0 10. 00 H= 50 .0 10. 00 H= 6 0.0 10. 00 N=

  5. Run Prog02.exe by: C:> Prog02 < Prog02.in > Prog02.out
  6. Display the output by: C:> Edit Prog02.out
  7. Your Prog02.out should compare correctly to Prog02.sjc (in the Course Web Page). Modify (and correct) your program until your Prog02.out shows the correct results.
  8. Hand in:
    1. Printed copies of your Prog02.for and Prog02.out C:> copy prog02.for LPT1 C:> copy prog02.out LPT1
    2. Your 3.5" diskette containing your Prog02.for, Prog02.obj, Prog02.exe, and Prog02.out. a) Place your 3.5" diskette into A drive, then b) C:> copy prog02. a:*