



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Exam; Class: Matlab Programming; Subject: Computer Sci & Software En; University: Auburn University - Main Campus; Term: Unknown 2000;
Typology: Exams
1 / 5
This page cannot be seen from the preview
Don't miss anything!




j
tlt;
GG.D--.--
$3ffio rzgffi @C1ub
COMP 0120 Fditran,^ Winter 2000
SAMPLE EXAM
n
la. -/ )ndicate if^ the^ following^ statements are^ valid^ or^ invalid^ [2 pts^ each]:
CHARACTER(Ien :^ 4) :: (^) "Teta, Beta* (^) 1, Alpha*S
Irttp:l lweb99.duc. auburn. ed)web99/p99 I 8/cse (^) I 20lsample-exl .htm
D language translator
num_derivative=(Log"(X+Delta_X)-Logu (X)/Delta_X
/ l< .xx ,_flux:e x^ da'^ cos(theta)^ c /n./,,.
( average_velocit5(x2-x (^1) / (tz-tl) (^) ue /c (^) ,1 - (^) W loo; (^) \ , (,xvo) (^) - tj X',& t\ /ltt distancrvelocity x^ 1i.u"celeratiori x tim&tz.o
a(;ll<n,< (^) = v</i lr,^ 1,,< * a6ce/er*);,-
centripetal acc=4.0 x^ piz x^ r/(*) (^) 4sn/n;pe/^ l (^) -atc<. tl,t2 (^) * pi
2t2t
F' (^) '-At
statement is (^) valid?, (Place X)
(Place (^) X)
Alpha:"ALulluPFIAu
fttl (^) --
p__N*,r(Z+1)
INTEGER :: sl = 16- s2: 12
4.-3*(2t6)
(4.0+2.0)*2t
s2< sl) .AND.( d >^ 5+
NOT. (s2::^ 14) .OR. (.NOT.^ d: :7^ .6.OR. (^) d >:^ 4.
IPLE EXAM #I
Sum,= Sum +^ REAL
END DO
END PROGRAM Doloop
l_-/ t I
t-,
L,' {1.tl
S-*+::_l^ I
Page 4 of
2U
I^ I a \y' t
-{(?^ t
Output:
"aption (^) (user's (^) option) (^) , calculates: ' (^) X(horizontal (^) displacement of the rocket, measured in ft)
I'(vertical displacement of the rocket measured in ft)
http://web99. (^) duc.auburn .edulwebggl p99 I 8/cse I 2Olsample-ex I (^) .htm
as long the dser wish. (^)!
Allow (^) userto input: n Vo{intial velocity measured (^) in ft/sec) value Theta (angle at which a rocket is fired measured in radians
op t (^) io n (user's (^) eiption) character value which (^) values can be:
uX* (^) if (^) the user wants to compute the horizontal displacement of the rocket, measured in ft.+ "Y" if the user wsnts to compute the vertical displacement ofthe rocket measured in ft 'E" if^ the^ users^ wish^ no longer^ to^ compute any^ of these two values
,IPLE EXAM #1 (^) Page 5 of
212/0a
an eror message in case the user type in a wrong option.
f *nlt,^ '1 ,'^
t , fror"* (^) ''6''fr'e F
;&}i (^) )'t{ v;'tytl;t; r (^ t x^ , (^)?
I t^ tl"r$t.tty',4', 'L I Pr
th*rv\l
DoP",nt (^) r, " Eo,le,^
t vllaa^lile"il^ *:r
ftnorl
,
l/''l.q
fr;nrY,"fnltn
+v l:-z"
K'^'l
r' t
/r; (^) ^r
, " /r'{rt^
tL i^ *;Lt^ n)^
ve (^) fo':}7t
/u^}
#, (^) Vo h,rl,? {0, -(r:n]*, "^ f^ ^lut
Nii{"'l
'tl' l'"'i7o-I*l^ ;: ;r (^) '"'" ' A
d,ryLrJror"
t (^) !' {1:f J (^) "l Wtt:c'al
q'2f(^<v' (^) )''
r ) t.* i Llr^ *{-^ n^ ^ l,^ $r 1{ le^ "
#i 'i^ ,
; lu (^) )t. {
{ t
rt,{fu$,r6Pii:d's (^) \ r ' 'ti{ (^) (Kn+r"^e-'? t ) L*: , , \
,- (^) L/o * (^) L' (^) ; 1?e !t++3 r-^
,t (^) x ,"{enr"
8,,!if
.i,''fi','i:';$"t'i;"^'e
*r a'l^ y'
b.:^(r,*,, I^ Y,.!^ i^ 2,(i!:,I),^ :^
lrt r,Y t"l#^
A
Else tr( (ro, pt*€, t^ t^ t) (^) Ef;t
hdElI( (^) 'att*ta
i'tvn+ (^) €r'l' \
f"'lDO , , :
E,/,
(C.tL KArt
t