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-21 11:41

>>105
Eh? Tell me again you can't locate the error. Tell me again why you thought 'return' was an error. Tell me again why you don't work as a programmer. Tell me again why are still a virgin.

Name: Anonymous 2012-02-21 11:45

>>105
Now continue to look for the error you mental midget. I still don't think you see it, because like, well, you are a dumbass. Now fire back with another snide comment instead of trying to learn something you fucking dumb nigger.

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