int textbook;
char cover;
double rprice;
double fprice;
Console.WriteLine("Enter number of books");
textbook = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Do you want hardback? y/n");
cover = Convert.ToChar(Console.ReadLine());
rprice = textbook * 125;
if (cover == 'y' && textbook > 4)
{
double discount = 0.20; // 20% discount
double tax = 0.05; // 5% tax
fprice = rprice - (discount * rprice) + (tax * rprice);
Console.WriteLine(fprice);
}
int textbook;
char cover;
double rprice;
double fprice;
Console.WriteLine("Enter number of books");
textbook = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Do you want hardback? y/n");
cover = Convert.ToChar(Console.ReadLine());
rprice = textbook * 125;
if (cover == 'y' && textbook > 4)
{
double discount = 0.20; // 20% discount
double tax = 0.05; // 5% tax
fprice = rprice - (discount * rprice) + (tax * rprice);
Console.WriteLine(fprice);
}