Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ Literature

Name: Novice 2011-01-23 17:10

I'm in no way even a decent programmer. I'd like to become better, and have already settled on C++ as the language to begin with. I've learned quite a bit from reading documentation and online tutorials, etc, but I think it's time to read an actual book on C++.

What book(s) should I get and why?

Name: Anonymous 2011-01-24 17:54

>>26
Exercise 1.11.  A function f is defined by the rule that f(n) = n if n<3 and f(n) = f(n - 1) + 2f(n - 2) + 3f(n - 3) if n>= 3. Write a procedure that computes f by means of a recursive process. Write a procedure that computes f by means of an iterative process.

"use strict"
function f(n) {
    if (n < 3) {
      return n;
    }
    return f(n-1) + 2 * f(n-2) + 3 * f(n-3);
}


"use strict"
function f(n) {
   var arr = [0, 1, 2];
   if (n < 3) {
       return arr[n];
   }

   for (var i=3; i <= n; i++) {
       arr[i] = arr[i-1] + 2*arr[i-2] + 3*arr[i-3];
   }
   return arr[n];
}

Name: Anonymous 2011-01-24 17:57

>>41
"use strict"
What's that?

Name: Anonymous 2011-01-24 17:59

>>42
Ok, just googled it.

Name: Anonymous 2011-01-24 18:28

"use my anus"

Name: Anonymous 2011-01-24 18:57

>>44
NO THANK YOU!!

Name: Anonymous 2011-01-24 21:01

>>41
function f(n) {
   var arr = [0, 1, 2];

   for (var i=3; i <= n; i++) {
       arr[i] = arr[i-1] + 2*arr[i-2] + 3*arr[i-3];
   }

   return arr[n];
}


OMG OPTIMISED

Name: Anonymous 2011-01-24 21:20

RISE FROM YOUR GRAVE, FROZENVOID

function f(n){var a=[0,1,2],i;for(i=3;i<=n;a[i]=a[i-1]+2*a[i-2]+3*a[++i-2]);return a[n];}

Name: Anonymous 2011-01-24 21:36

>>47
Be careful what you wish for, child, even if in but a jest.

Name: Anonymous 2011-01-24 21:37

>>48
FV was the only valuable prog poster.

Name: Anonymous 2011-01-24 21:42

>>49
Oh, you think so? Then time how quickly you'll change your mind when he comes back with his asspie, necroposting-hissy-fit ways, you crazy bastard.

Name: Anonymous 2011-01-24 21:51

>>50
Until then, we have VIPPER, the ``in Lisp'' guy and the noko/I lol'd/nice/autism guy (he's the same person, I'm sure).

Name: Anonymous 2011-01-24 21:57

>>51
No, until then, we have you, me and The Sussman. And that's way more than you, me and The Sussman deserve, you ingrate.

Name: Anonymous 2011-01-24 22:04

>>52
If you are VIPPER, The Sussman is the ``in Lisp'' guy trolling us, guess who I am.

Name: Anonymous 2011-01-24 22:15

>>53
Uh, Sir Anus of Milkribs, lord of the Sock-Brick?

Name: VIPPER 2011-01-25 3:55

VIPPER dislikes the concept of anonymous, VIPPER only likes VIP QUALITY posters such as VIPPER.
The list time i checked anonymous is legion and trolled for that assleaks dude.

Name: Anonymous 2011-01-25 9:54

>>52
No, we have you, Xarn and The Sussman

Name: Anonymous 2011-01-25 15:22

>>56
In which case, hello Xarn, haven't seen you in a while

Name: Anonymous 2011-01-25 18:47

>>57
What makes you so sure it wasn't The Sussman?

Name: Anonymous 2011-01-25 19:07

>>58
Because you are The Sussman, I am me and he his Xarn.

Name: Anonymous 2011-01-25 20:02

>>58-59
No, because I am The Sussman, and I am also not >>55 ("you", as >>56 demonstrated). Thus >>56 must be Xarn.

Name: Anonymous 2011-01-25 20:08

>>60
Actually, I am >>56,59, you are The Sussman and >>57 is Xarn

Name: Anonymous 2011-01-25 20:28

>>56-61
Perhaps we are labouring under a faulty premise here.

Name: Anonymous 2011-01-25 20:38

>>62
You mean there's more than 3 people on this board?
Nigga, you high as a motherfucker. Pass dat shit.

Name: Anonymous 2011-01-26 4:39

2^6 get

Name: Anonymous 2011-01-27 13:44

>>64 epic win lol!! :)

Name: Anonymous 2011-01-27 13:57

>>64
EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP! EPIC WIN OP!

Name: Anonymous 2011-02-03 3:18


Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List