Change the Directory | Programming Quiz 1 Fall 2009 | CSCI 260, Quizzes of Computer Science

Material Type: Quiz; Class: FORTRAN PROGRAMMING; Subject: Computer Science; University: Colorado School of Mines; Term: Spring 2007;

Typology: Quizzes

Pre 2010

Uploaded on 08/16/2009

koofers-user-a6g
koofers-user-a6g 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CSCI260 Programming Quiz # 1 Spring 2009 Page 1 of 2
Change directory into your working area. ex:
cd csci260a
Create a directory for quiz1. ex:
mkdir quiz1
Change directory into the new directory. ex:
cd quiz1
Copy file from the common area. ex:
cp /class/csci260a/Assignments/quiz1/* .
Edit the file. ex:
xemacs quiz1.f95 &
A small test rocket is being designed for use in testing a retrorocket that is intended to
permit “soft” landings. The designers have derived the following equations that they
believe will predict the performance of the test rocket.
(t = elapsed time in seconds)
Acceleration in ft/sec2 = 4.25 – 0.015t2 + 6.07t2.751 / 9995
Velocity in ft/sec = 4.25t – 0.015t3 / 3 + 6.07t3.751 / (3.751 * 9995)
Distance in ft = 90 + 4.25t2 / 2 – 0.015t4 / 12 + 6.07t4.751 / (4.751 * 37491)
(Note: The distance equation gives the height above ground level at time t and the
first term (90) is the height in feet above ground level of the launch platform that will
be used.) In order to check the predicted performance, the rocket will be “flown” on
the computer, using the derived equations. Write a complete program to cover a
maximum flight of 100 seconds. The data printout is to be like the example below.
Increments of time are to be 2.0 seconds, from launch through the ascending and
descending portions of the trajectory. If the rocket impacts the ground (less than 0)
prior to 100 seconds, the program is to stop immediately after impact.
The example of output for the program is:
TIME ACCELERATION VELOCITY DISTANCE
(SEC) (FT/SEC**2) (FT/SEC) (FT)
0 4.250000 0.0000000 90.00000
2 4.194088 8.462180 98.48092
4 4.037522 16.70935 123.7047
6 3.793965 24.55431 165.0496
8 3.475271 31.83514 221.5454
10 3.092299 38.41256 291.9208
12 2.655241 44.16829 374.6474
Script your program and submit it. Use the data values of 2.0 for each option (C, S, T),
pf2

Partial preview of the text

Download Change the Directory | Programming Quiz 1 Fall 2009 | CSCI 260 and more Quizzes Computer Science in PDF only on Docsity!

CSCI260 Programming Quiz # 1 Spring 2009 Page 1 of 2 Change directory into your working area. ex: cd csci260a Create a directory for quiz1. ex: mkdir quiz Change directory into the new directory. ex: cd quiz Copy file from the common area. ex: cp /class/csci260a/Assignments/quiz1/. Edit the file. ex: xemacs quiz1.f95 & A small test rocket is being designed for use in testing a retrorocket that is intended to permit “soft” landings. The designers have derived the following equations that they believe will predict the performance of the test rocket. (t = elapsed time in seconds) Acceleration in ft/sec^2 = 4.25 – 0.015t^2 + 6.07t2.751^ / 9995 Velocity in ft/sec = 4.25t – 0.015t^3 / 3 + 6.07t3.751^ / (3.751 * 9995) Distance in ft = 90 + 4.25t^2 / 2 – 0.015t^4 / 12 + 6.07t4.751^ / (4.751 * 37491) (Note: The distance equation gives the height above ground level at time t and the first term (90) is the height in feet above ground level of the launch platform that will be used.) In order to check the predicted performance, the rocket will be “flown” on the computer, using the derived equations. Write a complete program to cover a maximum flight of 100 seconds. The data printout is to be like the example below. Increments of time are to be 2.0 seconds, from launch through the ascending and descending portions of the trajectory. If the rocket impacts the ground (less than 0) prior to 100 seconds, the program is to stop immediately after impact. The example of output for the program is: TIME ACCELERATION VELOCITY DISTANCE (SEC) (FT/SEC*2) (FT/SEC) (FT) 0 4.250000 0.0000000 90. 2 4.194088 8.462180 98. 4 4.037522 16.70935 123. 6 3.793965 24.55431 165. 8 3.475271 31.83514 221. 10 3.092299 38.41256 291. 12 2.655241 44.16829 374. … … … … … … … Script your program and submit it. Use the data values of 2.0 for each option (C, S, T),

CSCI260 Programming Quiz # 1 Spring 2009 Page 2 of 2 and the error message. Make sure you run it four times. Show the error message working. script quiz1.script cat quiz1.f g95 quiz1.f a.out ..... etc. .... ..... etc. .... control-d to exit the script CLsubmit csci260a quiz1 quiz1.script