(Advanced) Simple While blocks:
Reading:
4.1,2.3, 2.6, 2.8, 2.11
Programming: Use While Loops:
1.
Write an mfile which will calculate n! = n(n1) (n2) . . . 1
Note:
0!=1.
a.
Use a while loop.
b.
The program will keep reading values of n as long as n is nonnegative.
When
a negative value is
read, the loop will stop.
c.
Print n & n! for each value read.
d.
Run your program with 5 different values of n.
2.
#4.18.
Use disp() in the loop to create the Table of Values.
Include a Title and column headings with
units for all tables in this class.
3.
Balloon Lift Problem.
This assignment coordinates with the first assignment in ASE102.
A.
Balloon equations:
W
air
=
ρ
o
r
3
π
(4/3)
e
–h/
α
W
gas
= MW/28.8
*
W
air
(h=0)
W
total
= W
gas
+ W
balloon
+ W
payload
Lifting Force = W
air
(h)
Write a Program which will find the maximum height of a lighter than air balloon.
B.
Read values for the weight of the balloon, weight of the payload, radius of the balloon, molecular
weight of the lifting gas, the scale factor,
α
,
and the increment of height,
∆
h.
This is the end of the preview.
Sign up
to
access the rest of the document.
 Fall '07
 Hayes
 Force, Mass, Hot air balloon, Lighter than air, lifting force

Click to edit the document details