Write a program that asks the user to enter the number of packages purchased. The program should then display the amount of the discount (if any) and the total amount of the purchase after the discount.a software company sells a package that retails for $99 . Quantity discounts are given according to this table. Quantity Discount 10-19 20% 20-49 30 50-99 40% 100 or more 50% Solution using System; public class Test{ public static double dis(int val){ if (val >= 10 && val <= 19) return (val*99)*0.2; if (val >= 20 && val <= 49) return (val*99)*0.3; if (val >= 50 && val <= 99) return (val*99)*0.4; if (val >= 100) return (val*99)*0.5; return 0.0; } public static void Main(){ Console.WriteLine(\"enter the number of packages purchased : \"); int val = Int32.Parse(Console.ReadLine()); Console.WriteLine(\"Total Amount : \"+val*99); Console.WriteLine(\"Discount : \"+dis(val)); Console.WriteLine(\"Amount to be paid : \"+(val*99 - dis(val))); } } .