Well, I've finished the tutorial. Again, great material dduardo.
But the open goal at the end seems a bit steep. A text adventure? With out object-orientation? But, I guess it's a challenge.
Except i ran into a major hurdle. Text inputs. This code:
#include <cstdlib>
#include...
Could you be kind enough to explain why it's crashing when n-r==0 ?
EDIT: I changed the condition for the if statement in 'factorial' to (num==1 || num==0) and now it works fine. I'm never nicking code off the internet again.
Thanks for bringing it to my attention. I can't believe I didn't...
First off, dduardo, thank you for what has been, so far, a most excellent tutorial.
Having said that, the pascals triangle task has seemed daunting to me, and I had to look up how to make my own functions to do it efficiently, and I came up with this:
#include <cstdlib>
#include...
Please think things through before you say them. TV caused a cultural revolution. It was essentially the birth of modern news media. TV is not a problem, being a lazy fatass and sitting in front of it all day is.
Oh, yes, totally. The species would be so much better without agriculture, clean water, hygiene, antibiotics, ICUs, and worst of all: a low infant mortality rate!
Remember, these kinds of objections have been made to virtually every technological advancement made in the history of humankind...
So, adapting my previous example,
function:
y=\sqrt{x}
Because it always gives the positive root,
not function:
y=\pm\sqrt{x}
Because it gives two answers for each x.
Despite the curse of a useless GCSE curriculum, I think I've finally got it. Also, LaTeX is really freaking cool.
Gotcha, I keep forgetting about that little plussy-minusy thing.
But if, as you are saying, they are both functions, how does one represent non-functional graphs? (is my wording right? I'm trying to pick stuff up here.)
Well, I thought that some you guys might enjoy a good cypher to crack.
I was going to put two in, but it made the post too long. Don't be put off by the large size, that works to your advantage. If you think you've got it, post the answer in hidden text in a reply.
If you want more, ask me...
So, anything that is not a function cannot be plotted? Because I've seen many graphs on Wikipedia that have more than one point of y for every x. Like elliptic curves, used in cryptography.
Now, it's almost certain that I've got completely the wrong end of the stick, but I'm not going to stop...