Page 5 of 5 FirstFirst ... 345
Results 41 to 47 of 47

Thread: C Challenge (Part 1)

  1. #41
    Join Date
    Oct 2004
    Posts
    4,814
    Rep Power
    24

    Default

    Quote Originally Posted by crosswire
    Personal note: Nobady no tek no offence. I love C++ and I planning to migrate to C#. I want the three C, C++, C# under my belt with my love being the one that can do all three
    Ok.. i support ur move... but what is that about love being the one that can do all three? im lost

  2. #42
    Join Date
    Sep 2004
    Posts
    1,905
    Rep Power
    21

    Default

    OH I meant the compiler and dev environment
    Let's act on what we agree on now, and argue later on what we don't.
    Black men leave Barbeque alone if Barbeque don't trouble you

  3. #43
    Join Date
    Mar 2004
    Posts
    232
    Rep Power
    0

    Default

    "and I thought I was the most arrogant person on TJ... wow... some y'all amaze me."

    We all know who that is.

  4. #44
    Join Date
    Jan 2005
    Posts
    3,151
    Rep Power
    0

    Default

    who me?

  5. #45
    Join Date
    Jan 2005
    Posts
    3,151
    Rep Power
    0

    Default

    Nope, I am as lost as an ant on my kitchen floor.

  6. #46
    Join Date
    Dec 2004
    Posts
    1,181
    Rep Power
    0

    Talking My Solution

    Below is my solution to the problem as promised. I finally finished my exams, and so got some time to attempt it.

    /*+-----------------------------------------+
    |Name: Password Decryptor |
    |Programmed By: psybuck2002us |
    |Date: May 10, 2005. |
    |Compiler: Borland C++ Builder 5.02 |
    +-----------------------------------------+
    */

    #include <stdio.h>
    #include <conio.h>
    #include <ctype.h>
    #define z 122
    #define a 97
    #define max 80

    int main(void)
    {
    int count, i, j, k;
    int pword[max];

    printf("----========== Password Encryptor ==========----\n\n\nEnter Password: ");
    for(count = 0; (pword[count] = getchar()) != '\n'; count++)
    {
    pword[count] = tolower(pword[count]);
    (pword[count] == z) ? pword[count] = a : pword[count] += 1;
    for(i = 0; i < 6; i++)
    {
    (pword[count] == a) ? pword[count] = z : pword[count] -= 1;
    }
    for(j = 0; j < 11; j++)
    {
    (pword[count] == z) ? pword[count] = a : pword[count] += 1;
    }
    }
    printf("\nEncrypted Password: ");
    for(k = 0; k <= count; k++)
    {
    printf("%c", pword[k]);
    }
    getch();
    return 0;
    }






  7. #47
    Join Date
    Dec 2002
    Posts
    500
    Rep Power
    0

    Default

    i like crosswirs's solution.
    neat

    as for the rest of you cussin'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •