piterdevries Posted December 27, 2006 Share Posted December 27, 2006 damn that programming professor of mine. >:(.. he gave us a tremendous assignment, here:You can now research a problems(Programming problems)10 Nested loops10 Dimensional arrays10 Single arrays10 problems using strings(toupper, tolower etc..)please help me.. or can u give me a site where i can find them?? thanks a lot!! ;D Quote Link to comment Share on other sites More sharing options...
veK Posted December 27, 2006 Share Posted December 27, 2006 so what exactly is the homework? I don't get much out of "you can now research a problem" Quote Link to comment Share on other sites More sharing options...
gryphon Posted December 27, 2006 Share Posted December 27, 2006 shouldn't you be telling us which language you are supposed to use ;) Quote Link to comment Share on other sites More sharing options...
Cyborg Posted December 28, 2006 Share Posted December 28, 2006 Does "10 Nested loops" mean you have to create 10 random code examples using nested loops? How dull is that?And what language are we talking about? Quote Link to comment Share on other sites More sharing options...
piterdevries Posted December 28, 2006 Author Share Posted December 28, 2006 turbo c. our prof wants us to provide 10 examples of each given. 10 examples of programs with the use of nested loops. Quote Link to comment Share on other sites More sharing options...
Acriku Posted December 28, 2006 Share Posted December 28, 2006 Does "10 Nested loops" mean you have to create 10 random code examples using nested loops? How dull is that?And what language are we talking about?Or just TWO random code examples ;-) (lame joke I know)I imagine since you're just starting, it'd be C that you're currently studying? Quote Link to comment Share on other sites More sharing options...
piterdevries Posted December 28, 2006 Author Share Posted December 28, 2006 yes, am just a 1st year computer science student and that prof of mine is killing us with piles of homework. please help me.. :( Quote Link to comment Share on other sites More sharing options...
Acriku Posted December 28, 2006 Share Posted December 28, 2006 turbo c. our prof wants us to provide 10 examples of each given. 10 examples of programs with the use of nested loops.Ah, never did Turbo C, how different is it from regular C? Does this make sense to you in C? :for(int i=0;i<10;i++) {Â for(int j=5;j>i;j--) {Â Â j = j+i;Â }}See the for loop within the for loop? While I can't imagine what use this piece of code would be (I guess in some situations it might help), it would be an example of a nested loop. Quote Link to comment Share on other sites More sharing options...
piterdevries Posted December 28, 2006 Author Share Posted December 28, 2006 oh yes that one does.. we are required to provide 10 sample programs (code and output). Quote Link to comment Share on other sites More sharing options...
Acriku Posted December 28, 2006 Share Posted December 28, 2006 How different do they have to be between each other? Like, could you just make a nested for loop and a nested while loop for two examples and change variables to create 10 examples? Not sure how indepth your professor wants to go. Quote Link to comment Share on other sites More sharing options...
piterdevries Posted December 28, 2006 Author Share Posted December 28, 2006 hmmmm that wont do. them programs must have different outputs, not just different variables. Quote Link to comment Share on other sites More sharing options...
Cyborg Posted December 28, 2006 Share Posted December 28, 2006 So the programs must have outputs? Quote Link to comment Share on other sites More sharing options...
gryphon Posted December 28, 2006 Share Posted December 28, 2006 oh yes that one does.. we are required to provide 10 sample programs (code and output).Are you making us do your homework ?Usually you can get lots of examples in the documentation to copy and use. You might want to try the MS and Borland support sites.I imagine since you're just starting, it'd be C that you're currently studying?They made me start with BASIC and compiler.After that Pascal Delphi SQL . .... with C (C++, C# ..) after a while, just before Java. It's strange that after a few years everything looks like BASIC with a few extra's.. :P Quote Link to comment Share on other sites More sharing options...
Cyborg Posted December 28, 2006 Share Posted December 28, 2006 Nowadays people usually start off with Java when learning to program.At least in Norway... Quote Link to comment Share on other sites More sharing options...
piterdevries Posted December 28, 2006 Author Share Posted December 28, 2006 im not saying that u do my homework. i juz nid help and what i really need is a site where i can find those given problems... thanks! Quote Link to comment Share on other sites More sharing options...
erjin999 Posted December 28, 2006 Share Posted December 28, 2006 I used to use this site for snippets of code to help me out:http://www.planetsourcecode.com/Your assignment doesn't make a whole lot of sense, why 10 different iterations (:P) of a simple nested loop ? Once you done one, you've done em all. How much different can they get ? Shure, the inputs and outputs are different, but the nested bits stay pretty much similar. Quote Link to comment Share on other sites More sharing options...
piterdevries Posted December 28, 2006 Author Share Posted December 28, 2006 dunno, my prof juz gave us that assignment, juz posted it in his yahoo group without even any explanations. Quote Link to comment Share on other sites More sharing options...
erjin999 Posted December 28, 2006 Share Posted December 28, 2006 Feel free to call him names...I feel a pent up anger from you at his behaviour. Swear if it will help you vent some anger...Hold a knife at him and say C# ! :P Quote Link to comment Share on other sites More sharing options...
number6 Posted January 7, 2007 Share Posted January 7, 2007 dunno, my prof juz gave us that assignment, juz posted it in his yahoo group without even any explanations. Sounds like a lame programming assignment to me.this is what I would submit:while(1){Â print("lame 1");Â while(2)Â {Â Â print("lame2"); Â Â exit();Â }}while(2){Â print("lame 2");Â while(3)Â {Â Â print("lame3"); Â Â exit();Â }}while(3){Â print("lame 3");Â while(4)Â {Â Â print("lame4"); Â Â exit();Â }}while(4){Â print("lame 4");Â while(5)Â {Â Â print("lame 5"); Â Â exit();Â }}while(5){Â print("lame 5");Â while(5)Â {Â Â print("lame 6"); Â Â exit();Â }}etc.....Is this assignment that hard really?Maybe you should find another course of study? Quote Link to comment Share on other sites More sharing options...
erjin999 Posted January 7, 2007 Share Posted January 7, 2007 There has got to be more to it then that. Thats too crap. Shurely... (I mean the teacher must have meant more, not your examples, 6 ;)). Quote Link to comment Share on other sites More sharing options...
number6 Posted January 7, 2007 Share Posted January 7, 2007 I will say in all the CS classes I took in college I never had an assignment like this one and that is why I gave such a simple answer. Based on the little information that was provided by the student my example would meet the 10 nested loops part of the assignment. I guess you could add the 10 Dimensional arrays (I am assuming 2 dimensions) 10 Single arrays, 10 string conversions(toupper, tolower etc..) to my example to handle all the work at once. Really when an instructor is vague like this how can he/she expect anything useful at all. All it sounds like to me is that the instructor wants the student to become familiar with these very basic programming concepts. This is one area where the student really should make sure he understands what the instructor is trying to teach and not look for examples online. You can't be a good programmer without learning how to solve problems yourself. Sure everyone looks at examples for new concepts, but the programmer needs to able to apply this information to the specific task at hand. Quote Link to comment Share on other sites More sharing options...
Megashrap Posted January 7, 2007 Share Posted January 7, 2007 "You can't be a good programmer without learning how to solve problems yourself."That's about all you can say about this whole topic. ;) Quote Link to comment Share on other sites More sharing options...
Cyborg Posted January 7, 2007 Share Posted January 7, 2007 The problem with many "educational" programming assignments is that they have little or no purpose. Programmers are trained in solving problems; not making them, as is the case here. You never hear from your employer: "Just make me some code, damnit... I don't care what it does as long as it's a loop!" Quote Link to comment Share on other sites More sharing options...
Edric O Posted January 10, 2007 Share Posted January 10, 2007 Why don't people ever ask for help with economics instead? Quote Link to comment Share on other sites More sharing options...
erjin999 Posted January 10, 2007 Share Posted January 10, 2007 Can you lend me some money Edric ? ;) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.