Vous êtes sur la page 1sur 3
77 Cakcutates @ worker's pay Ceross and nat) based on thelr sll level, nner oF hours worked (regular and overtine), 1 ang Insurance and reticenent tans public class Pay ¢ publse statse voss wasn(Strsng{] a8) ( Searmer input ~ neu Searner(systemin): systen.cut.prirtan(“cnoose your seit Levelt 1p 2, 3.*)s nt sedanLeved = Angut.rent Tet) 11 roaeay gay for ski22 tevel piteh (ekillLeved) & hourlyPay = 373 nourtyeay = 29; rouriyeay = 223 Sisten.eut.priatin(“trror: imatis skint reve. 11 roars worked EF (akiNDLevel 9 0 85 skiMnLevel € 4) ¢ Systen.out.printIn(*how wany hours ia you werk); {nt regutantours = doput-nert2ne()s Sot overténeburs = 34 (cegutarvours > 98) & vertinenours + reeutartoues — 385 > Goole rele?) = repartee © Sahay Gchiue otutey-reninvey + oierinsy ool Set logTeineilsty = 285 coole retreertlen = totaly" 5, > system out. pent yu tke 4) maseahtnsurnce, 2) dents turn, afr 4) Lng sara totes» nga nt) F (eice =) spre out arinti(ou have aes nec Ssurane.") Syren out arnt ou hate aes etal Lure pane ie (eutes 3) ‘eentseciecuctlon 2 LrgTesel0y5 syotenoit \pritin Yon be was ene tem sity Snoraces ‘yremomtariti(ou have cove to alo the Sesrece tens. "lt 8 nasetctons 2; 4 ceca = 3) 4 pats ( System out grSntlncYeu nave chazen 29 sia the Sosuranee optsone.*}s > Duhite (choice {= @ 48 naielections ¢3)5 7% ? Sp (gesnatever = 3) ( Syston out pristun(cuts you tke te panicipace sn the ratSeenent plan? 1) Yer 2) te) soe natSranantvenie = put nesttee()s 5 (watéranantvenia 22) ( stonizesoenuctdons s+ rensrenentrion: Systen.out.printin(-veu nave chosen to participate in tre retirement plan pease ¢ ‘systen.out.grintin(-Yeu nave chose not to participate in tne retirenent lan. ‘oubie netPay = totairay - itenlzesvenuctions; systen.ovtserintin(): Syaten.out.grtntin(ciours norked: * + totltoues)s Systen.ovt griatin(Hourly pay rater $° + nounyPay)s Systen.ovt,printin("Regular pay for 48 ours: $° + regularray): Systenvovtserlatin(“Overtine pay: $° + overlnehay)s Systen.ovt,griatin("Totad ay: $° + otalhay) AF (lsentzedbeductlons > totalPay) ¢ Systen.out.grlottn(*Errort desuctions exceed totat pay.’ pense t ‘Systen.out.oriatin("Total Itentzee deauctonsi $* + Stentzespecucttons): Systen.out.ordatancet ga): $° + peta,

Vous aimerez peut-être aussi