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

My awesome C++ triangle

Name: GOD_HATES_THE_JEWS 2012-02-18 10:49

//Homework 2, question 5

#include <iostream>
using namespace std;

int main(void)
{
 int n;
 int r, c;

 cout << "Enter a number: ";
 cin >> n;
 
 n = 2 * n + 2;
 
 for (r = 1; r <=n; r++, cout << endl)
     for (c = 1; c <=n; c++)
         cout << (r==1 || r==n || c==1 || c==n
              || r >= c || (r+c < n+1) ? ' ' : '*');

 return 0;  
}

Name: Anonymous 2012-02-20 19:32

>>51
oh look, kodak is samefagging again to try and make himself more relevant.

>>53
>You're just mad because you still can't spot the undefined behavior in the program.
Really kodak? I never knew this whole time I was suppose to be looking for undefined behavior in the code posted. Way to completely switch the topic on us. It's not even hard to spot anyway considering the function `int main...' has no return statement.

>maybe you should give it a rest, find the old thread in question, try to follow it, and then see what I just saw right away.

Oh, so now we switch the topic again and now you want me to find you some shitty thread posted months/years ago? Good one, how about you be the little codemonkey you're and do it for us.

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