Bilal Hameed (Nebb engineering)
Bilal Hameed (Nebb engineering)
CC#
Created by Bilal Hameed (Nebb engineering) on 8/3/2023 in #help
❔ top-level statement
29 replies
CC#
Created by Bilal Hameed (Nebb engineering) on 8/3/2023 in #help
❔ top-level statement
i understand
29 replies
CC#
Created by Bilal Hameed (Nebb engineering) on 8/3/2023 in #help
❔ top-level statement
so I should include top level-statement
29 replies
CC#
Created by Bilal Hameed (Nebb engineering) on 8/3/2023 in #help
❔ top-level statement
So I need to make a folder everytime I want to a new cs file?
29 replies
CC#
Created by Bilal Hameed (Nebb engineering) on 8/3/2023 in #help
❔ top-level statement
this is my main file
29 replies
CC#
Created by Bilal Hameed (Nebb engineering) on 8/3/2023 in #help
❔ top-level statement
Random random = new Random();
int daysUntilExpiration = random.Next(12);
int discountPercentage = 0;
test.method();
// Your code goes here

if (daysUntilExpiration > 11)
{
Console.WriteLine("Your subscription will expire soon. Renew now!");
}
else if (daysUntilExpiration > 5)
{
discountPercentage = 10;
Console.WriteLine($"Your subscription expires in {daysUntilExpiration} days. Renew now and save {discountPercentage}%!");
}
else if (daysUntilExpiration > 1)
{
discountPercentage = 20;
Console.WriteLine($"Your subscription expires in {daysUntilExpiration} days. Renew now and save {discountPercentage}%!");
}
else if (daysUntilExpiration == 1)
{
discountPercentage = 20;
Console.WriteLine("Your subscription expires within a day! Renew now and save {discountPercentage}%!");
}
else
{
Console.WriteLine("Your subscription has expired.");
}


public class class2 {
{

}

}
Random random = new Random();
int daysUntilExpiration = random.Next(12);
int discountPercentage = 0;
test.method();
// Your code goes here

if (daysUntilExpiration > 11)
{
Console.WriteLine("Your subscription will expire soon. Renew now!");
}
else if (daysUntilExpiration > 5)
{
discountPercentage = 10;
Console.WriteLine($"Your subscription expires in {daysUntilExpiration} days. Renew now and save {discountPercentage}%!");
}
else if (daysUntilExpiration > 1)
{
discountPercentage = 20;
Console.WriteLine($"Your subscription expires in {daysUntilExpiration} days. Renew now and save {discountPercentage}%!");
}
else if (daysUntilExpiration == 1)
{
discountPercentage = 20;
Console.WriteLine("Your subscription expires within a day! Renew now and save {discountPercentage}%!");
}
else
{
Console.WriteLine("Your subscription has expired.");
}


public class class2 {
{

}

}
29 replies
CC#
Created by Bilal Hameed (Nebb engineering) on 8/3/2023 in #help
❔ top-level statement
i have 2 cs files
29 replies
CC#
Created by Bilal Hameed (Nebb engineering) on 8/3/2023 in #help
❔ top-level statement
yes
29 replies
CC#
Created by Bilal Hameed (Nebb engineering) on 8/3/2023 in #help
❔ top-level statement
but this is the top-level statement file
29 replies
CC#
Created by Bilal Hameed (Nebb engineering) on 8/3/2023 in #help
❔ top-level statement
can we have an online session?
29 replies
CC#
Created by Bilal Hameed (Nebb engineering) on 8/3/2023 in #help
❔ top-level statement
i have tried to make an file with method and class (help from ChatGPT), but it doesnt work
29 replies
CC#
Created by Bilal Hameed (Nebb engineering) on 8/3/2023 in #help
❔ top-level statement
the console output says vthat I am missing partial modifier on declaration of type 'program'
29 replies
CC#
Created by Bilal Hameed (Nebb engineering) on 8/3/2023 in #help
❔ top-level statement
using System;

public class Program
{
public class Calculator
{
public int Add(int num1, int num2)
{
return num1 + num2;
}
}

static void Main()
{
Calculator calculator = new Calculator();
int result = calculator.Add(5, 10);
Console.WriteLine("The sum is: " + result);
}
}
using System;

public class Program
{
public class Calculator
{
public int Add(int num1, int num2)
{
return num1 + num2;
}
}

static void Main()
{
Calculator calculator = new Calculator();
int result = calculator.Add(5, 10);
Console.WriteLine("The sum is: " + result);
}
}
29 replies
CC#
Created by Bilal Hameed (Nebb engineering) on 8/3/2023 in #help
❔ top-level statement
ok, I need to make method and class?
29 replies