Luke Dimond
No matter what number it always prints "Your subscription will expire soon. Renew now!"
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace newTrain
{
internal class Program
{
static void Main(string[] args)
{
Random random = new Random();
int daysUntilExpiration = random.Next(12);
int discountPercentage = 0;
// Your code goes here
if (daysUntilExpiration <= 10)
{
Console.WriteLine(daysUntilExpiration);
Console.WriteLine("Your subscription will expire soon. Renew now!");
}
else if (daysUntilExpiration <= 5)
{
Console.WriteLine(daysUntilExpiration);
Console.WriteLine($"Your subscription expires in {daysUntilExpiration} days.\r\nRenew now and save 10%!");
}
else if (daysUntilExpiration == 1)
{
Console.WriteLine(daysUntilExpiration);
Console.WriteLine("Your subscription expires within a day!\r\nRenew now and save 20%!");
}
else if (daysUntilExpiration == 0)
{
Console.WriteLine(daysUntilExpiration);
Console.WriteLine("Your subscription has expired.");
}
else
{
}
Console.ReadLine();
}
}
}
11 replies