Professional Documents
Culture Documents
putln("\ if
{ nHour:"); ((Gpay>15000)&&(Gpa
public static void main y<=25000))
(String []args)
{
double Hour=TextIO.getInt();
x=0,average,sum,greater Wtax=Gpay*0.04;
,greater_than5;
double TextIO.putln("\ if
price=TextIO.getDouble nRate:"); (Gpay>25000)
;
double price=new
double[20];
for(x=0; x<=20; x++){ Rate=TextIO.getDouble Wtax=Gpay*0.05;
sum+=price; ();
TextIO.put(sum);
average=sum/20; TextIO.putln("\ Npay=Gpay-
nWtax:"); Wtax;
TextIO.put(average);
}
if(price>=average) TextIO.putln("\
TextIO.put("greater"+pr Wtax=TextIO.getDoubl nWithholdingtax:"+Wta
ice); e(); x);
else
TextIO.put("low");
if(price>5.0) TextIO.putln("\
TextIO.put("greater_tha Gpay=Rate*Hour; nGrossPay:"+Gpay);
n5"+price);
else
TextIO.put("lower"); TextIO.putln("\
if nNetPay:"+Npay);
} (Gpay<=5000)
}
Wtax=0;
public class QUICK
public class son if
{ ((Gpay>5000)&&(Gpay {
public static void <=15000))
main (String[]args) public static void main
{ (String[]args)
int Hour;
double Wtax=Gpay*0.02; {
Rate,Gpay,Wtax,Npay;
TextIO.putln("l\n\n\n\
nThe quick brown fox
jumps over the lazy dog TextIO.putln("\n\n\
near the bank of the nEnter the Number of
river;"); the Annual subsctription
Fee:");
TextIO.putln("\n\n\
nwadadsdsdssdsf;"); annual_subscription_fee
=TextIO.getDouble();
}
} refund_to_be_given_bac
k=annual_subscription_f
ee*.02/.50;
TextIO.putln("\n\n\nThe
refund to be given back
to the subscriber is :");
TextIO.put(refund_to_b
e_given_back);
}
}public class
MercadoPreMidExam
double
annual_subscription_fee
,refund_to_be_given_ba
ck,reduced;