Click here to Skip to main content
15,886,963 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: (20*23) + (25*28) + (30*33) + (35*38) +...........+ (m*(m-3)) what is the c programmimg code of the summetion of this series Pin
jschell22-Jun-23 7:41
jschell22-Jun-23 7:41 
GeneralRe: (20*23) + (25*28) + (30*33) + (35*38) +...........+ (m*(m-3)) what is the c programmimg code of the summetion of this series Pin
trønderen19-Jun-23 8:39
trønderen19-Jun-23 8:39 
GeneralRe: (20*23) + (25*28) + (30*33) + (35*38) +...........+ (m*(m-3)) what is the c programmimg code of the summetion of this series Pin
Richard Deeming19-Jun-23 19:49
mveRichard Deeming19-Jun-23 19:49 
GeneralRe: (20*23) + (25*28) + (30*33) + (35*38) +...........+ (m*(m-3)) what is the c programmimg code of the summetion of this series Pin
kalberts20-Jun-23 6:05
kalberts20-Jun-23 6:05 
GeneralRe: (20*23) + (25*28) + (30*33) + (35*38) +...........+ (m*(m-3)) what is the c programmimg code of the summetion of this series Pin
jschell22-Jun-23 8:05
jschell22-Jun-23 8:05 
GeneralRe: (20*23) + (25*28) + (30*33) + (35*38) +...........+ (m*(m-3)) what is the c programmimg code of the summetion of this series Pin
jschell20-Jun-23 5:30
jschell20-Jun-23 5:30 
GeneralRe: (20*23) + (25*28) + (30*33) + (35*38) +...........+ (m*(m-3)) what is the c programmimg code of the summetion of this series Pin
trønderen20-Jun-23 5:53
trønderen20-Jun-23 5:53 
GeneralRe: (20*23) + (25*28) + (30*33) + (35*38) +...........+ (m*(m-3)) what is the c programmimg code of the summetion of this series Pin
jschell22-Jun-23 7:57
jschell22-Jun-23 7:57 
trønderen wrote:
and create homework assignments, with problems suited for recursion.


Not sure what you mean.

First of course teachers are human. So like any other group there a good ones, bad ones and a whole lot of average ones. So yes they might be using a bad example.

Second I can see where the equation can be solved by recursion. Probably too complicated both for teaching recursion and for teaching other methods as well. Although perhaps the class will also include unrolling and perhaps then it might be better (hypothetically of course.) And then perhaps the teacher feels that would be a good follow on from this specific example.

trønderen wrote:
So if that is the case here, the teacher should be blamed. Especially if the assignment is as suggested in the subject line,


Quite possibly. But then what is the scenario where that specific equation is an effective tool for teaching the basics of say a 'for' loop.

Are you claiming it is a good example for that?

Or are you claiming that the teacher is still bad but in fact must be teaching about loops instead?

trønderen wrote:
A lot of problems can be described in a very concise form in recursive terms, but can easily be implemented as an iteration (and most students will not discover that and make a recursive implementation ... I speak of experience). Here is no trace of a recursive problem description.


There is a lot in that.

First in my experience classroom work, never, teaches the use of the field in practical terms. Not in programming, not in engineering, not in the soft sciences, etc.

Not even in the field of teaching. One possible exception might be that if one wants to learn to be a university professor. And only a university professor. But not for example a middle school teacher.

Possible it has changed since I was in school but I haven't run into any young programmers that even know what bit fiddling is. So I doubt it.

Second, as I remember, university professors did like recursion quite bit. Probably because, as you noted, the expression is concise. They were using it to teach the algorithm and not, as I noted above, practical programming. So in that case it doesn't matter if the implementation would be impractical.
GeneralRe: (20*23) + (25*28) + (30*33) + (35*38) +...........+ (m*(m-3)) what is the c programmimg code of the summetion of this series Pin
Richard MacCutchan20-Jun-23 6:19
mveRichard MacCutchan20-Jun-23 6:19 
GeneralRe: (20*23) + (25*28) + (30*33) + (35*38) +...........+ (m*(m-3)) what is the c programmimg code of the summetion of this series Pin
jschell22-Jun-23 7:58
jschell22-Jun-23 7:58 
GeneralRe: (20*23) + (25*28) + (30*33) + (35*38) +...........+ (m*(m-3)) what is the c programmimg code of the summetion of this series Pin
Richard MacCutchan22-Jun-23 9:36
mveRichard MacCutchan22-Jun-23 9:36 
GeneralRe: (20*23) + (25*28) + (30*33) + (35*38) +...........+ (m*(m-3)) what is the c programmimg code of the summetion of this series Pin
jschell23-Jun-23 10:29
jschell23-Jun-23 10:29 
QuestionRegQueryValueExW vs RegQueryValueExA Pin
PV202317-Jun-23 22:41
PV202317-Jun-23 22:41 
AnswerRe: RegQueryValueExW vs RegQueryValueExA Pin
Graham Breach18-Jun-23 1:34
Graham Breach18-Jun-23 1:34 
GeneralRe: RegQueryValueExW vs RegQueryValueExA Pin
PV202318-Jun-23 4:05
PV202318-Jun-23 4:05 
GeneralRe: RegQueryValueExW vs RegQueryValueExA Pin
Dave Kreskowiak18-Jun-23 4:42
mveDave Kreskowiak18-Jun-23 4:42 
Questionmutex problem Pin
PV202314-Jun-23 20:51
PV202314-Jun-23 20:51 
AnswerRe: mutex problem Pin
Richard MacCutchan14-Jun-23 21:17
mveRichard MacCutchan14-Jun-23 21:17 
AnswerRe: mutex problem Pin
jschell15-Jun-23 2:33
jschell15-Jun-23 2:33 
QuestionIs there a way to add all the elements of a vector to an integer sequentially? Pin
puckettrobinson6755-Jun-23 18:16
puckettrobinson6755-Jun-23 18:16 
AnswerRe: Is there a way to add all the elements of a vector to an integer sequentially? Pin
Victor Nijegorodov5-Jun-23 20:39
Victor Nijegorodov5-Jun-23 20:39 
AnswerRe: Is there a way to add all the elements of a vector to an integer sequentially? Pin
Richard MacCutchan5-Jun-23 21:30
mveRichard MacCutchan5-Jun-23 21:30 
AnswerRe: Is there a way to add all the elements of a vector to an integer sequentially? Pin
CPallini5-Jun-23 21:44
mveCPallini5-Jun-23 21:44 
QuestionImage compression Pin
Calin Negru30-May-23 9:09
Calin Negru30-May-23 9:09 
AnswerRe: Image compression Pin
OriginalGriff30-May-23 9:18
mveOriginalGriff30-May-23 9:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.