63 033
Assignments Done
99,1%
Successfully Done
In July 2018

Answer to Question #15669 in C# for Zulekha

Question #15669
define a console application project to display the different formatting styles used in display methods(i.i. console.writeLine())
Expert's answer
using System;
using System.Collections.Generic;
using
System.Linq;
using System.Text;

namespace _15669
{
public
class TipCalculator
{
private const double tipRate =
0.18;
public static int Main(string[] args)

{

double billTotal = 1352.06;
double
tip = billTotal * tipRate;

Console.WriteLine();
Console.WriteLine("Bill
total:\t{0,8:c}", billTotal);
Console.WriteLine("Tip
total/rate:\t{0,8:c} ({1:p1})",
tip, tipRate);

Console.WriteLine(("").PadRight(24, '-'));

Console.WriteLine("Grand total:\t{0,8:c}", billTotal + tip);

Console.ReadLine();
Console.ReadLine();

return 0;
}
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions