Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,412 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,453 people online right now. Registration is fast and FREE... Join Now!




designer

 
Reply to this topicStart new topic

designer, howz the design buddies??

avinandanaot
15 Oct, 2008 - 07:17 AM
Post #1

New D.I.C Head
*

Joined: 14 Oct, 2008
Posts: 13


My Contributions
CODE
#include              <stdlib.h>
#include               <stdio.h>


#define                  O int
#define                 B   main
#define                F     char
#define               U       if
#define              S         atoi
#define             C           for
#define            A             putchar
#define           T               '*'
#define            E             ' '
#define             D           '\n'
#define              c         ==
#define               o       =
#define                d     ++
#define                 e   return
#define                  r ||

                         O
                        B (
                       O   k
                      ,     F
                     *       v
                    [         ]
                     )       {
                      O     i
                 ,     j   =     9
               ; U     ( k     > 1
               )   {     j     =   S
              (     v         [     1
             ]       )      ;       }
            U         (     !         (
             j       >       0       )
              )     {         j     =
         5    ;   }           U   (     (
        j &     1 )             c 0     ) {
       d   j    ;               }     C   (
      i     =                         0    ;
     i       <           j           *       j
   ;         A         ( i         /         j
     c       (           3           *       j
      )     /                         2     -
       (   i     %               j     +   1
        ) r     i /             j c     j /
         2     -   i           %   j     r
              i     /         j     c
             j       /       2       +
            i         %     j         r
             i       /       j       c
              i     %         j     -
               j   /     2     ?   T
                : E     ) ,     i d
                 ,     i   %     j
                      c     0
                     ?       A
                    (         D
                     )       :
                      0     )
                      ;   e
                        0;
                         }




biggrin.gif smile.gif

Moe edit - Please code.gif
~BetaWar
User is offlineProfile CardPM
+Quote Post

AmitTheInfinity
RE: Designer
15 Oct, 2008 - 10:22 PM
Post #2

C Surfing ∞
Group Icon

Joined: 25 Jan, 2007
Posts: 1,025



Thanked: 35 times
Dream Kudos: 125
My Contributions
looks nice, congratz.
ummm, I have a doubt. Does that thing compiles? blink.gif
User is offlineProfile CardPM
+Quote Post

no2pencil
RE: Designer
15 Oct, 2008 - 10:23 PM
Post #3

My fridge be runnin OH NOEZ!
Group Icon

Joined: 10 May, 2007
Posts: 6,462



Thanked: 66 times
Dream Kudos: 2425
Expert In: Goofing Off

My Contributions
Even if it did compile, there is no function. Not even a main, which is required.
User is online!Profile CardPM
+Quote Post

Linkowiezi
RE: Designer
16 Oct, 2008 - 12:13 AM
Post #4

D.I.C Head
**

Joined: 7 Oct, 2008
Posts: 72



Thanked: 11 times
My Contributions
Well I havn't tried compiling it but...
cpp
                         O
B (
O k
, F
* v
[ ]
) {
...
}
// seems to equal
int main( int k, char *v[] ){
...
}

Nice looking design, but... Not that easily read...

EDIT: Yes it was compilable and also ran since it had a main()
QUOTE(no2pencil @ 16 Oct, 2008 - 08:23 AM) *
Even if it did compile, there is no function. Not even a main, which is required.

Didn't actually read trough the whole thing but the output was:
cpp
// Output:
*
* *
* *
* *
* *
* *
* *
* *
*

Nice work... Tough as I said earlier... not that readable...

This post has been edited by Linkowiezi: 16 Oct, 2008 - 12:26 AM
User is offlineProfile CardPM
+Quote Post

no2pencil
RE: Designer
16 Oct, 2008 - 12:46 AM
Post #5

My fridge be runnin OH NOEZ!
Group Icon

Joined: 10 May, 2007
Posts: 6,462



Thanked: 66 times
Dream Kudos: 2425
Expert In: Goofing Off

My Contributions
...ok yeah, I see what he did here. bleh...
User is online!Profile CardPM
+Quote Post

AmitTheInfinity
RE: Designer
16 Oct, 2008 - 12:55 AM
Post #6

C Surfing ∞
Group Icon

Joined: 25 Jan, 2007
Posts: 1,025



Thanked: 35 times
Dream Kudos: 125
My Contributions
Wow, so it works. Great. Congratz again.

But so much design efforts on code to print a diamond?
I think it looks better when we do it as per coding standards, than the one given here. smile.gif Seems that the OP has lot of time to do such things. biggrin.gif
User is offlineProfile CardPM
+Quote Post

red_4900
RE: Designer
16 Oct, 2008 - 02:23 AM
Post #7

Code Dreamers
****

Joined: 22 Feb, 2008
Posts: 816



Thanked: 11 times
My Contributions
Is this even a question? blink.gif
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/2/08 12:29PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month