Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Ace Mchee B.

AIdusau BSME-4A Cnpntt Fntmesl fsrcening Meeule


LE ARNING ACTIVITIES

*
im port jaJa til,

Plkc class loiu{


publt stote Veid moin (S+ring L]
angs)
Scannev Scan hew Scanner
(Sqem. in)
dsute VEtu la,

75+ otpvint u p t Res:stov 4")


deble RI: scan, next Lut ().
Sstem. Gutprint put Peststor a',"
doubie RA :scoan.nex+ut (S
SLe sut. Puit (Juput Rester3: ")
deyle R3 Scan. nex int O
stnout putvt npt Resistev 4:")
dle P4Scan. neytJvt C)
oble
y RT fmula (R1, Ra, R3
y
Math. ,R4);
round (x* i00.0) /J00.0
Tstn-out.print nTotal Fesistaudt (Rt) "
double
tx +
"ohmsS.
ITfoinylo(Vtotl, x)
dahle VRA
do,le RI Scavn. next n t )
pstGuttpvtInput Reistev 4:"),
dc le ASan. nextJut )

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

Stutie double ITfovmulG (deulsle a double L)


rebn a/b

statt double RTfvnla (daulble a, doubltb, desle c, doulle ) {


veuvn (b*c/Cb+¢)) +ad

stentte doubit VFufovulo(deuble o, deuble L){


rebunn a*b

Sttie deable Ifn fevmala ( deuble vtot deulie vóidouble vt, double vn)
retunn (vtot (vii V4))/rn

o
toaj
Aort jva util,3

p sEabie void tatn


CCtrtug L] anys)
Scannev Stan new Scanntr(Sttme ih)
Sstnout pvint uput yeluctt ef tue Lall (in
eble VAmph scan,e ytit iles/henr)")
03
Sstemout.puint ("Iuput ongle u degnees)
double Augle Deg ccan.next nt
()%
dole pveAngle deytonad (angie Deg)
dele fe vi ileto meter (Vjmph)
diuble a x Heigt h fevmh
lpnoj Vi, pnaj hngle)
wmax Nat Math.reund (mayHeit *icg000)/16e000
S4stn Cut.pniut ("ntght of the bal
tmox Hetsht +" meten)
stnt doulle deyterad( Jouble dea)
neturn (deg * Moath. P)/lSC
stttc doulle iletomettr (deuble ile) {
ebnn Cmile I,0)/3Gco a s 1
3 hr- 6G0 sec
stngic dauble h formla (Joalte metty
neturn dable rad)
((o)* (metiv mett)* (CMath. sin (raJ) )» (Menthsiu vo)) ))/9.8
[O3J
Public clas Motn
Fl t « E ' vcid matn Sbuing L] angs)
char ace
ace '\u00àa' /asttnisk
iut 2S
wwile (zi-S &e 2 70)
ut y 10
while iL [0 y70)
iut 7e)
whtle Cy R y70)
Sqstem owt. pint (ace)

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)

ystem Ot print (s")

You might also like