You are on page 1of 2

using System;

using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Abigail Affirim


{
internal class Program
{
static void Main(string[] args)
{
int k, Q, A, l, h;
double m;
Console.WriteLine("Enter integer");
k = Convert.ToInt32(Console.ReadLine());
Q = Convert.ToInt32(Console.ReadLine());
A = Convert.ToInt32(Console.ReadLine());
l = Convert.ToInt32(Console.ReadLine());
h = Convert.ToInt32(Console.ReadLine());

if (h > 2 && h <= 6)

{
m = (k * Q) / (A * l * h);
Console.WriteLine(m);
Console.WriteLine("m is valid");
}
else if (l > 6)
Console.WriteLine("m is valid");

else
{
Console.WriteLine("m is invalid");
}

double PurchaseAmt;
double Discount;
Console.WriteLine("Enter amount");
PurchaseAmt = Convert.ToDouble(Console.ReadLine());

if (PurchaseAmt >= 500)


{
Discount = 0.15 * PurchaseAmt;
Console.WriteLine("Amount discounted is:" +Discount);

}
else if (PurchaseAmt >= 300 && PurchaseAmt<500)
{
Discount = 0.10 * PurchaseAmt;
Console.WriteLine("Amount discounted is:" + Discount);

}
else if (PurchaseAmt >= 50 && PurchaseAmt < 300)
{

Discount = 0.05 * PurchaseAmt;


Console.WriteLine("Amount discounted is:" + Discount);
}
else if (PurchaseAmt >0 && PurchaseAmt <50)
{
Console.WriteLine("Discount invalid");
}
else

{
Console.WriteLine("Invalid Amount");
}
}
}

You might also like