activity-selection algorithm in c#
-
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.
I was brought up to respect my elders. I don't respect many people nowadays.
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier -
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.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
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.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
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.
I was brought up to respect my elders. I don't respect many people nowadays.
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier -
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 was brought up to respect my elders. I don't respect many people nowadays.
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier -
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() { "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.
-
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.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
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() { "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.
-
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.