Write a DisplaySalesTax() method that receives the sales amount and tax rate as doubles, and calculates and displays the sales tax. The method does not return a value.

What will be an ideal response?

public static void DisplaySalesTax(double saleAmount, double taxRate)
{
double tax;
tax = saleAmount * taxRate;
WriteLine("The tax on {0} at {1} is {2}",
saleAmount.ToString("C"),
taxRate.ToString("P"), tax.ToString("C"));
}

Computer Science & Information Technology

You might also like to view...

In Writer, the shortcut key ________ opens the File menu

Fill in the blank(s) with correct word

Computer Science & Information Technology

Table border thickness should be defined in the CSS file, not the HTML structure.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology