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-18 19:16

C++ implicitly excludes awesomeness.

Sepples is shit and so is your shitty code.

Name: Anonymous 2012-02-18 19:28

>>2
At least <<1 has the brain capacity to write code. Now shut up and go suck on another monkey's dick you mental midget you.

Name: Anonymous 2012-02-18 19:30

>>3
code monkey detected!

how's it feel spending 8 hours hammering away at your keyboard for a single bug?

stupid code monkey can't even think! LOL!

Name: Anonymous 2012-02-18 19:34

>>4
This is coming from a non programmer. And actually, it was only 6 hours you poor excuse for a homosexual.

Name: Anonymous 2012-02-18 19:40

>>3
At least I have the mental capacity to properly quote something, you stupid piece of shit.

C++ is a fucking joke, suck my balls.

Name: Anonymous 2012-02-18 19:45

>>6
You're just upset because, if given the same problem, you wouldn't have been able to solve it right away. Nice job princess. You're below average. Now go run off and get ready to serve your shift at Burger King.

Name: Anonymous 2012-02-18 19:48

>>7
It's easy you stupid piece of shit, if you think this is hard you should tell your mother to reconsider her choice of not having an abortion despite letting some mental midget inseminate her. Fuck off back to /g/ you fucking retard.

Name: Anonymous 2012-02-18 19:51

>>8
It's easy because >>1 alrady posted a solution you fucking no talent programmer. Also, you lame ass unoriginal bitch, come up with your own one liners instead of stealing mine.

Name: Anonymous 2012-02-18 19:52

>>9
Stay mad you fucking retard.

Name: Anonymous 2012-02-18 19:55

>>10
Go away. You are dumb and boring. Seriously. Your grammar sucks, you really don't know how to write code, and the extent of your arguments is stealing my one liners. Nice job nigger. You're below average!

Name: Anonymous 2012-02-18 19:56

>>9
So working from a clean slate, do you think writing a program that creates a text triangle is challenging?

Name: Anonymous 2012-02-18 19:57

>>12
It's the ultimate challenge in functional languages. Haskell experts have been trying and failing for years now.

Name: Anonymous 2012-02-18 19:58

>>12
For you yes. For me no, because, unlike you, I know how to write code. Again, there is as vast difference between saying you can do something and actually doing it. Hence why suck dick.

Name: Anonymous 2012-02-18 19:59

>>14
Hence why suck dick.
I think you need to take your pills.

Name: Anonymous 2012-02-18 20:01

>>15
Hush you.

Name: Anonymous 2012-02-18 20:03

>>14
Well, I hope you have a fulfilling life creating those text triangles.

Name: Anonymous 2012-02-18 20:09

>>17
I believe being able to solve the problem is what is known as basic problem solving. This is something that you seem to lack. By the way, I'm way beyond that you idiot. I do stuff like implement various types of optical flow algorithms and a bunch of other things that are wll beyond your limited mentality.

Name: Anonymous 2012-02-18 20:10

>>17
I've also contributed code to the apache hadoop project. Again, this is stuff well beyond your limited mental capacity.

Name: Anonymous 2012-02-18 20:13

>>18
By the way, I'm way beyond that you idiot.
I'm not convinced, you seem to think creating text triangles are difficult, which indicates that you're a stupid mouthbreathing piece of shit.

Name: Anonymous 2012-02-18 20:14

>>19
Yeah, was it a text triangle?
Were the Apache devs amazed at your incredible text triangle code?

Name: Anonymous 2012-02-18 20:15

>>20
Stop projecting. That is you who things creating text triangles are difficult. Again, please tell us what you do for a living you mental midget you.

Name: Anonymous 2012-02-18 20:16

>>21
Do you see a text triangle anywhere in the source code you mental midget? Exactly. Now shut up and go scrub another toilet you dumb nowhere bitch.

Name: Anonymous 2012-02-18 20:19

>>21
And I find it amazing how someone like yourself, who has zero credentials, can be so lippy. Maybe you should shut up and perhaps learn something from those of us who can write the non trivial code. Oh wait. That would require you to think!

Name: Anonymous 2012-02-19 0:09

>>22
That is you who things creating text triangles are difficult
Do you mean ``thinks''? And I never said it was difficult, I said it was easy, you're the one who thought it was a monumental challenge you dumb piece of shit.

>>23
I don't look at the code of shitty toy projects like Apache, sorry.

>>24
You're the lippy one you fucking faggot, all you have done is to claim that you contributed code to some unscalable shit that performs poorly like Apache. I don't see any proof in this thread you fucking retard.

Name: Anonymous 2012-02-19 1:18

ITT nerd fight.

Hawt :p

Name: Anonymous 2012-02-19 3:53

APL, 36 characters:
(⍪(1+(2×I)-N),¨N←N,1↓⌽N←⍳I←⎕)/¨⊂' *'
Try it in NARS2000.

Name: Anonymous 2012-02-19 11:36

>>25
You're just mad because that code is beyond your limited skill set. Now run off and go scrub another toilet you no talent bitch.

Name: Anonymous 2012-02-19 13:04

>>27
J, 24 characters:
' *'{~(*|.)}.<:/~i.2+2*n

(There's no decent I/O so just set n to some number; this makes your code 34 characters, without the ←⎕.)

Name: Anonymous 2012-02-19 13:11

   n =. 10            NB. Set n first
   2++:n              NB. Caclulate 2n + 2
22
   <:/~i.2++:n          NB. Table of x <= y, for [0..2n+2)
1
   <:/~i.2++:n          NB. Table of x <= y, for [0..2n+2)
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 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0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
   ' *'{~(*|.)}.<:/~i.2++:n          NB. format, by indexing from ' *'
                     *
                    **
                   ***
                  ****
                 *****
                ******
               *******
              ********
             *********
            **********
           ***********
            **********
             *********
              ********
               *******
                ******
                 *****
                  ****
                   ***
                    **
                     *

Name: Anonymous 2012-02-19 13:11

(disregard lines 3-4, that was me fucking up)

Name: Anonymous 2012-02-19 15:06

>>28
You still seem to think that creating a text triangle is hard, why is that? Are you really this fucking untalented?

Name: Anonymous 2012-02-19 15:31

>>32
No sir, that would be you. Now go off and continue to look like a dumbass when reading the apache hadoop source code you damn mental midget. Or better yet, give up your dreams of ever becoming a programmer, accept the fact that you are a zero talent bitch, and continue to smile as you scrub those toilets.

Name: Anonymous 2012-02-19 15:54

>>32
Also you uncreative nigger, stop stealing my one liners and come up with your own. I know this might be kind of hard since you are a total dumbass, but at least try you dumb douche.

Name: Anonymous 2012-02-19 20:54

>>33,34
Still no proof that you contributed to anything, even to shit projects like Apache.

Name: Anonymous 2012-02-19 20:55

>>33
No sir, that would be you.
I always said it was easy, you said it was extremely challenging.

Name: Anonymous 2012-02-20 7:54

>>35
And you still haven't shown us any kind of proof that you can code anything beyond "hello world" in Python.

Name: root@eecs.berkeley.edu !!zP3z7jK93VrbiW0 2012-02-20 7:58

>>36
Go run off and scrub another toilet you mental midget you.

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-02-20 8:10

>>35
Actually, now that I think about it, you still haven't demonstrated anything beyond the ability to call people names. What do you do for a living? Have you ever actually written a single line of production code in your entire life?

Name: Anonymous 2012-02-20 8:22

Sure is wannabe Kodak-sans in here. Wanting to grow up to be a aspirng java codemonkey must be lovely.

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