Thread: check this code out

  1. #16
    Registered User
    Join Date
    Jun 2003
    Posts
    21
    run the code up guys and come up with an answer
    ,but least the code works for all that you said .
    tell me how it works
    if u r the elite
    ?

  2. #17
    Registered User
    Join Date
    Jun 2003
    Posts
    21
    run the code in DEV C++
    guys

  3. #18
    Registered User
    Join Date
    Jun 2003
    Posts
    21
    take the exe

  4. #19
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Originally posted by debuger2004
    run the code up guys and come up with an answer
    ,but least the code works for all that you said .
    tell me how it works
    if u r the elite
    ?
    I'm not going to do your homework for you (or extra credit, or whatever you feel like calling it). None of the regulars here about beling "elite". I have nothing to prove to you.

    Quzah.
    Hope is the first step on the road to disappointment.

  5. #20
    Banned
    Join Date
    May 2003
    Posts
    124
    >last weekend i went to a bookstore and scanned through about 10 different C books all of which used void main for the first half at least.

    I like that!

  6. #21
    Been here, done that.
    Join Date
    May 2003
    Posts
    1,164
    OK, ran it. Cute. It certainly doen't look like homework, Q. It looks to be a real question with a real answer and debuger2004 actually posted it for us to play with and analyze for fun.

    I assume you know why it works debuger2004, so now post new code that shows your name instead
    Definition: Politics -- Latin, from
    poly meaning many and
    tics meaning blood sucking parasites
    -- Tom Smothers

  7. #22
    Registered User
    Join Date
    Jun 2003
    Posts
    245
    Ok, well I gave in and finally chucked the code into a compiler, ran it, and it gave me a screen full of rubbish. From WaltP's post, I assume this was supposed to be a logo of some kind. Just goes to show really that if you must obfuscate your code, at least make it so it's compatible with most compilers !

    After running it and getting the garbage output, I got bored and deleted it rather than trying to work out why it produced garbage.

    So, debuger2004, YOU tell us why it produces garbage on certain compilers ? Or are we to assume you simply grabbed this code from somewhere else and claimed that you wrote it?

  8. #23
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    For those that are interested, here's the output
    Code:
    !!  !!!!!!!!!!!  !!!!!!!!!!!  !!!!!!!!!!!  !!!!!!!!!!!  !!       !!  !!!!!!!!!!
    !!  !!   !   !!  !!       !!  !!                !       !!       !!  !!
    !!  !!   !   !!  !!       !!  !!                !       !!       !!  !!
    !!  !!   !   !!  !!       !!  !!                !       !!       !!  !!
    !!  !!   !   !!  !!       !!  !!                !       !!       !!  !!
    !!  !!   !   !!  !!!!!!!!!!!  !!!!!!!!!!!       !       !!       !!  !!!!!!!!!!
    !!  !!       !!  !!           !!                !       !!       !!          !!
    !!  !!       !!  !!           !!                !       !!       !!          !!
    !!  !!       !!  !!           !!                !       !!       !!          !!
    !!  !!       !!  !!           !!                !       !!       !!          !!
    !!  !!       !!  !!           !!!!!!!!!!!       !       !!!!!!!!!!!  !!!!!!!!!!
    Wow, it's sooo l33t !
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  9. #24
    Registered User
    Join Date
    Jun 2003
    Posts
    21
    guys
    what the program does is that
    first see the code
    ok
    now what it does is it takes the ascii value of the characters between the exclamations
    and prints ! that many times in a pattern described by ascii value of characters after the !.
    this is almost the solution but still u guys can think harder to tell me how the pattern is generated exactly.
    impetus is our ieee tech fest for students
    you can visit www.ieeeuvce.org to learn more about it.
    i will post a similar code to print my name shortly.
    with an ellaborated ans to how the code works.
    dont be buged with the code it really is something to think about ,be patiient fellows
    "The New Testament offers the basis for modern computer coding theory, in the
    form of an affirmation of the binary number system. But let your communication
    be Yea, yea; nay, nay: for whatsoever is more than these cometh of evil."
    - Matthew 5:37

  10. #25
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >Wow, it's sooo l33t !
    Certainly creative, but I don't know about l33t.
    Code:
    #include<stdio.h>
    
    int main(void)
    {
        int a;
        int b = 10;
        int c = 10;
        char *s = "50 1337!!!!"
                  "!FFFFHDBH!BBDBDFFGA"
                  "BDBDBDBDBF!DBF!DBDBDBDBDBF"
                  "BDBDBDBDBF!DBF!DBDBDBDBDBF"
                  "BDBDBDBDFFBF!DBDBDBDBDFB"
                  "FFFFBF!DBF!DBDBDBDBDBF"
                  "BF!DBDBDBF!DBF!DBDBDBDBDBF"
                  "BF!DBDBDBF!DBF!DBDBDBDBDBF"
                  "BF!DBDBDHDHFDFFFGA";
    
        while ((a = s[b++ + 1]) != '\0')
        {
            while (a-- > 64)
                putchar((++c == 'Z') ? c /= 9 : 33 ^ b & 1);
        }
    
        return 0;
    }
    My best code is written with the delete key.

  11. #26
    Registered User
    Join Date
    Jun 2003
    Posts
    21
    thats perfect prelude ,you got the hang of it
    u cracked the jinx.
    "The New Testament offers the basis for modern computer coding theory, in the
    form of an affirmation of the binary number system. But let your communication
    be Yea, yea; nay, nay: for whatsoever is more than these cometh of evil."
    - Matthew 5:37

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Code Check
    By Dae in forum C++ Programming
    Replies: 12
    Last Post: 01-08-2009, 07:01 PM
  2. HELP!!!!emergency ~expert please help
    By unknowppl in forum C Programming
    Replies: 1
    Last Post: 08-19-2008, 07:35 AM
  3. << !! Posting Code? Read this First !! >>
    By kermi3 in forum Game Programming
    Replies: 0
    Last Post: 10-14-2002, 01:27 PM
  4. << !! Posting Code? Read this First !! >>
    By kermi3 in forum C# Programming
    Replies: 0
    Last Post: 10-14-2002, 01:26 PM
  5. Check my code Please
    By AdioKIP in forum C++ Programming
    Replies: 1
    Last Post: 03-12-2002, 08:52 PM