

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


1 nput, VFand rather VFthan ime VFin umber VFof VFeople s VFlegs VF(sides you VFknow VFthe VFngle VFas VFinput, mber VFof VFpizzas 1.22.1 VFLab: VFConvert VFto VFSeconds Write VFa VFprogram VFthat VFreads VFin VFhours, VFminutes, VFand VFseconds VFas VFi VFoutputs VFthe VFtime VFin VFseconds VFonly.: 2.22.2 VFLab: VFConvert VFfrom VFSeconds People VFfind VFit VFeasier VFto VFread VFtime VFin VFhours, VFminutes, VFand VFseconds VFjust VFseconds. Write VFa VFprogram VFthat VFreads VFin VFseconds VFas VFinput VFand VFoutputs VFthe VFt VFminutes, VFand VFseconds.: 3.22.3 VFLab: VFPizza VFParty Given VFthe VFnumber VFof VFpeople VFattending VFa VFpizza VFparty, VFoutput VFthe VFn VFneeded VFpizzas VFand VFtotal VFcost. VFFor VFthe VFcalculation, VFassume VFthat VFp VFslices VFon VFaverage VFand VFeach VFpizza VFhas VF 12 VFslices VFand VFcosts VF$14.95.: 4.22.4 VFLab: VFHypotenuse Given VFtwo VFnumbers VFthat VFrepresent VFthe VFlengths VFof VFa VFright VFtriangle' VFadjacent VFto VFthe VFright VFangle), VFoutput VFthe VFlength VFof VFthe VFthird VFside VF(i.e. VFwith VFtwo VFdigits VFafter VFthe VFdecimal VFpoint.: 5.22.5 VFLab: VFArea VFof VFa VFTriangle Using VFHeron's VFformula, VFyou VFcan VFcalculate VFthe VFarea VFof VFa VFtriangle VFif VFlengths VFof VFall VFthree VFsides. VFGiven VFthe VFlength VFof VFeach VFside VFof VFa VFtria VFcalculate VFthe VFarea VFof VFthe VFtriangle VFusing VFHeron's VFformula VFas VFfollow VFs VF= VFhalf VFof VFthe VFtriangle's VFperimeter area VF= VFthe VFsquare VFroot VFof VFs(s-a)(s-b)(s-c), VFwhere VFa, VFb, VFand VFc VFare VFeach VFsides VFof VFthe VFtriangle.: 6.22.6 VFOrdering VFPizza A VFlocal VFpizza VFshop VFis VFselling VFa VFlarge VFpizza VFfor VF$9.99. VFGiven VFthe VFnu VFto VForder VFas VFinput, VFoutput VFthe VFsubtotal VFfor VFthe VFpizzas, VFand VFthen VFou VFafter VFapplying VFa VFsales VFtax VFof VF6%: 7.22.7 VFLAB: VFSquare VFroot
2 f VFthe VFgiven Given VFa VFfloating-point VFnumber VFas VFinput, VFoutput VFthe VFsquare VFroot VFo VFnumber.: 8.22.8 VFLAB: VFVolume VFand VFarea VFof VFcylinder