Professional Documents
Culture Documents
Computer Fundamentals and Programming Learning Activiy Answers
Computer Fundamentals and Programming Learning Activiy Answers
*
im port jaJa til,
donble
RT fala (R1, Ra , R3 RA); ,
y
Mat. r0nd (x* 00.0) /100.0
enut. print nToial Resstate (RT) =" t x +"
ohns
double
ITfoula(Vtotl, x)
dable VR1
VR1 VRnfovmulG P )
doble VR4
VRA VRn fóvla(1 R4)
doble I RA
R IR runnla (Vtot«l, VR1,VR1, RA)
daul ble IRS
TRSTRn fuvmula (Vbotal, VR, VRA,R3)
y-Math,cmn (y /60.0)/i6o.0:
Sstem, out. pvivt (" \n letal Cuurent (IT) "
4t "Gmpeveg");
VR-Math. vinnd ( VR1 + l00. 0)/I90. O
S151tm, 6ut. priut ("n toltmge ÜRD) "VR1+ "yolts")
VR4 M cath.r Ound (vR4 * 100.0)/joo.0
Systm et i t ("yR4 Voltege (VA) =+VR4 yoHs)
R Mathi ouud (IRa j00.0)/190.0
Syshe t.print ( n a C r e t (1Ra) "+RA V autene")
IR Math.round ( P3 l60o.0)/ jse0.6
IR -Math,nduns (IR3 00. 0)/j00 0
Sstt Gt paiut ("nR3 Cnent (TRS) ="1R3 aapee")
H've nade it lhis way fo as at fist, hagk
pobl t P wegundih velaes pvodud8
det ya oundiny " . Hene, programmed such ivstend iu weve caleulattensw
pvii&itized,then a undigs" fov values pnoduej ceme after o uexesany
Calcult ion.
I/Htndi Fof pela nipoakctc but
a i the pnoram e
po iserttd certin u u h t
spaces alonyfrit codes po fw S potay m y a u a l i ns as tdiCatRa i fhe
inedule
Sttie deable Ifn fevmala ( deuble vtot deulie vóidouble vt, double vn)
retunn (vtot (vii V4))/rn
o
toaj
Aort jva util,3
System0tipatnt("\h"),
Co41
-0
C043
Pblic clas Maiu
publtt stattt void
minStriny E] angs)
Char oce
e "\ 00 Aa
while Cy70)
it
while Cy >=1) {
Sstn Out ptt (ace)