Hi,
I'm new in c# and i'm trying to print a receipt. but my codes are wrong, Here is my problem
> Compute the Price multiplied by the quantity given by the user
> Compute the said Amount - 12% tax
> Show the Vat Tax
> Accept money and compute the change
> they have to all appear once the unit price has been inputted
This are my codes at the moment for the computation part
bool test = false;
do
{
try
{
Console.SetCursorPosition(2, 12);
Console.Write(" ");
Console.SetCursorPosition(2, 12);
Num = Convert.ToInt32(Console.ReadLine());
test = false;
}
catch
{
test = true;
}
} while (test);
Console.SetCursorPosition(18, 12);
Console.ForegroundColor = ConsoleColor.Yellow;
telNumber = Console.ReadLine();
bool Ptest = false;
do
{
try
{
Console.SetCursorPosition(47, 12);
Console.Write(" ");
Console.SetCursorPosition(47, 12);
Amount = Convert.ToInt32(Console.ReadLine());
Console.SetCursorPosition(65, 12);
Amount = Amount * 2 ;
Console.WriteLine("P " + Amount.ToString("0.00"));
Console.SetCursorPosition(65, 15);
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("P " + Amount.ToString("0.00"));
Console.SetCursorPosition(65, 17);
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("P " + Amount.ToString("0.00"));
Ptest = false;
}
catch
{
Ptest = true;
}
} while (Ptest);
Console.ReadLine();
It has to look like this, Ive done the format but im having trouble with the said problems above, please help
Image at -
http://static.tumblr.com/xklso8y/PUfng8s5h/clipboard01.png[
^]
[Edit member="Tadit"]
Link text added to reflect the Article/QA title.
Corrected formatting and/or grammatical issues.
Added
pre
tags.
[/Edit]