Mon Mar 30, 2009 11:04 pm
public class Commission
{
public static void main(String[] args)
{
double salesFig = 4000.00;
double commRate = 0.075;
int commRateFig = 7;
computeCommission ();
}
public static void computeCommission(double salesFig, double commRate)
{
double commission;
commission = commRate * salesFig;
System.out.println("The commission on $" + salesFig + "is $" + commission);
}
public static void computeCommission(double salesFig, int commRateFig)
{
double commission;
commission = commRateFig / 100.0 * salesFig;
System.out.println("The commission on $" + salesFig + "at %" + commRateFig + "is
$" + commission);
}
}
Thu Apr 09, 2009 7:17 pm
double commission;
commission = commRateFig / 100.0 * salesFig;
System.out.println("The commission on $" + salesFig + "at %" + commRateFig + "is
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.