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:36

>>54
The person that posted that code is clueless. The fact that he was trying to make himself look smart makes him that much dumber. Now go away. You're not only dumb, but you're also boring. And yes, that's bad. Hell, even the clueless computer science major who is dumber than a box a rocks is more interesting that you.

Nice job homer. You're below average!

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