
|
hi dears...
i want the activity-selection algorithm in c#.
thanks for u...
|
|
|
|

|
There are many ways to select an activity. If you have a problem with some code you have written, feel free to post a question on it. Good luck.
|
|
|
|

|
sorry, my meaning was activity-selection algorithm that is greedy algorithm in C#. i have a project for university, i thanks so much if u help me.
best regards...
|
|
|
|

|
So you're trying to get me to pass your course. If you can't solve this, how do you expect to do this as a career?
|
|
|
|

|
I'm assuming you're talking about this[^]. Start there and write your own code. It's what you're going to school for or getting paid to write isn't it?? Either way, we're not writing your code for you.
|
|
|
|

|
sorry, my meaning was activity-selection algorithm that is greedy algorithm in C#. i have a project for university, i thanks so much if u help me.
best regards...
|
|
|
|

|
The whole point behind you getting these assignments is for YOU to demonstrate that you can applied what you've learned. It's NOT for us to do the work for you.
|
|
|
|

|
Here's an activity selection algorithmm coded in C# - probably not what you want.
But you have not explained what you want.
static void Main(string[] args)
{
Random rndGen = new Random();
var activities = new List<string>() { "bake bread", "mow lawn", "read book", "sleep", "don batman costume", "sneeze",
"have a beer", "code furiously", "make excuse for late assignment", "plead for help"};
for (int i = 0; i < 3; i++)
{
int act = rndGen.Next(activities.Count);
Console.WriteLine((i+1).ToString() + ". " + activities[act]);
}
Console.ReadLine();
}
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
The only valid measurement of code quality: WTFs/minute.
|
|
|
|

|
I think maybe a command line parser is in order.
|
|
|
|

|
mazizi0 wrote: hi dears... Hello luvver
mazizi0 wrote: i want the activity-selection algorithm in c#. Oooh, ooh I know this game. I want a Porsche.
mazizi0 wrote: thanks for u... No no. Thanks for YOU!
|
|
|
|

|
So what are you going to do when (if) you pass your course & get a job?
Ask your fellow employees to do your work for you, then take the credit for it?
How long do you think you'd last in that job?
Man up - put a bit of effort in and do it yourself or you're on a slippery slope to nowhere career-wise.
|
|
|
|