Page 4 of 5 FirstFirst ... 2345 LastLast
Results 76 to 100 of 106

Thread: programming challenge...

  1. #76
    Platinum Member
    Join Date
    Sep 2008
    Liked
    1 times
    Posts
    3,171

    Default

    Quote Originally Posted by newprouser View Post
    well it was simpler coz, Turbo C is very lenient, doin in java is the real challenge.

    Sent you PM.
    that was good.

    I'll PM you my solution.

    -F

    regarding the program that prints itself:

    I myself have to remember it, give me some time.
    I know it was only one line of c code. so I don't think
    Java or C++ would work, but if you manage in Java or
    C++ I would be impressed ;-)

    -F

    or you could do a trick and do it ;-)
    Last edited by Punch Farce; 08-06-09 at 03:52 PM. Reason: Automerged Doublepost

  2. #77
    newprouser
    Guest

    Default

    thanks !

    I hope the whole program isn't just one printf statement :lol:

  3. #78
    Silver Member
    Join Date
    Jun 2009
    Liked
    0 times
    Posts
    481

    Default

    Quote Originally Posted by newprouser View Post
    well it was simpler coz, Turbo C is very lenient, doin in java is the real challenge.

    Sent you PM.
    shall I throw you a hint for doing it in java???

  4. #79
    newprouser
    Guest

    Default

    Quote Originally Posted by nandini View Post
    shall I throw you a hint for doing it in java???
    Sure. Pm me.

    also the algorithm for the previous program please, not able to understand the logic.

  5. #80
    Platinum Member
    Join Date
    Sep 2008
    Liked
    1 times
    Posts
    3,171

    Default

    Quote Originally Posted by nandini View Post
    shall I throw you a hint for doing it in java???
    he's going to be

    -F

    ;-)

  6. #81
    Jedi knight Luke Skywalker's Avatar
    Join Date
    Jul 2009
    Age
    23
    Liked
    0 times
    Posts
    2,175

    Default

    Which problem are we solving now?

    Where is the option to attached? Can't find.

    Can I post the answer.
    Last edited by Luke Skywalker; 08-06-09 at 07:02 PM. Reason: Automerged Doublepost

  7. #82
    Jedi knight Luke Skywalker's Avatar
    Join Date
    Jul 2009
    Age
    23
    Liked
    0 times
    Posts
    2,175

    Default

    I am uploading the zip file of source code which is encrypted.
    Attached Files Attached Files

  8. #83
    Jedi knight Luke Skywalker's Avatar
    Join Date
    Jul 2009
    Age
    23
    Liked
    0 times
    Posts
    2,175

    Default

    When everyone have posted i will give the password.

  9. #84
    newprouser
    Guest

    Default

    Quote Originally Posted by Luke View Post
    I am uploading the zip file of source code which is encrypted.
    why ??

    we were waiting for you to finish.

    and post the code directly.

  10. #85
    Jedi knight Luke Skywalker's Avatar
    Join Date
    Jul 2009
    Age
    23
    Liked
    0 times
    Posts
    2,175

    Default

    I want to know which paradigm you have used. & I am a sceptic.

  11. #86
    newprouser
    Guest

    Default

    well whatever you are, post the code directly, every1's going to do the same.

  12. #87
    Jedi knight Luke Skywalker's Avatar
    Join Date
    Jul 2009
    Age
    23
    Liked
    0 times
    Posts
    2,175

    Default

    You can all attached here like me.

  13. #88
    Jedi knight Luke Skywalker's Avatar
    Join Date
    Jul 2009
    Age
    23
    Liked
    0 times
    Posts
    2,175

    Default

    Post guy.

  14. #89
    Jedi knight Luke Skywalker's Avatar
    Join Date
    Jul 2009
    Age
    23
    Liked
    0 times
    Posts
    2,175

    Default

    Who is going to post first?

  15. #90
    newprouser
    Guest

    Default

    Well here's mine...

    class Puzzle
    {
    public static void main(String[] args)
    {
    char[] a={'a','b','c','d','e','f','g','h','i','j' ,'k','l','m','n','o','p'};
    char[][] b=new char[4][4];

    int i=0,j=0,k=0,l=0,max=3,min=0;

    while (i<=3)
    { k=i;

    for(j=0;j<=i;j++,k--,l++)
    b[k][j]=a[l];

    i++;
    }

    while (min<=max)
    { ++min;
    i=max;

    for(j=min;j<=max;j++,i--,l++)
    b[i][j]=a[l];
    }

    System.out.print("\n\n");

    for(i=0;i<4;i++)
    {
    for(j=0;j<4;j++)
    System.out.print(b[i][j] + " ");

    System.out.print("\n");
    }
    }
    }

  16. #91
    18lama
    Guest

    Default

    Sorry for posting in this thread...I am not a programmer nor a mathematician...but it seems to keep everyone busy doing something intellectually stimulating, which is a very good thing.

    Reps+ to Nandini

    carry on...

  17. #92
    Jedi knight Luke Skywalker's Avatar
    Join Date
    Jul 2009
    Age
    23
    Liked
    0 times
    Posts
    2,175

    Default

    Mine is much better.pm you the pw.


    Spaces are included.

  18. #93
    newprouser
    Guest

    Default

    Quote Originally Posted by 18lama View Post
    Sorry for posting in this thread...I am not a programmer nor a mathematician...but it seems to keep everyone busy doing something intellectually stimulating, which is a very good thing.

    Reps+ to Nandini

    carry on...
    Yes indeed !!

  19. #94
    Jedi knight Luke Skywalker's Avatar
    Join Date
    Jul 2009
    Age
    23
    Liked
    0 times
    Posts
    2,175

    Default

    Anyone tried my program?

  20. #95
    newprouser
    Guest

    Default

    Yea, i saw, its good !

  21. #96
    Silver Member
    Join Date
    Jun 2009
    Liked
    0 times
    Posts
    481

    Default

    Quote Originally Posted by 18lama View Post
    Sorry for posting in this thread...I am not a programmer nor a mathematician...but it seems to keep everyone busy doing something intellectually stimulating, which is a very good thing.

    Reps+ to Nandini

    carry on...

    oh!! Thanks Amal.

  22. #97
    Jedi knight Luke Skywalker's Avatar
    Join Date
    Jul 2009
    Age
    23
    Liked
    0 times
    Posts
    2,175

    Default

    What 'bout me? Didn't I gave you rep.

  23. #98
    18lama
    Guest

    Default

    Quote Originally Posted by nandini View Post
    oh!! Thanks Amal.
    welcome...and create more such threads in the future. It keeps the young ones from spamming.

  24. #99
    newprouser
    Guest

    Default

    luke's program

    class math
    {
    public static void main(string[] args)
    {


    char[][] char2darray=new char[4][4];
    char chararray[]={'a','b','c','d','e','f','g','h','i','j','k','l', 'm','n','o','p'};
    int l;
    int k=0;
    int j;
    for(int i=0; i<7; i++)
    { l=i;
    j=0;
    while(l>-1)
    {
    if(j>3)
    break;
    else if(l>3||j>3)
    {l--;j++;}
    else
    {
    char2darray[l][j]=chararray[k];
    l--;j++;k++;
    }
    }
    }




    for(int i=0; i<=3; i++)
    {
    system.out.print("");
    for( j = 0; j <= 3; j++)
    {
    system.out.print(" " + char2darray[i][j]);
    }
    system.out.println("");
    }
    system.out.println();
    }


    }

  25. #100
    Jedi knight Luke Skywalker's Avatar
    Join Date
    Jul 2009
    Age
    23
    Liked
    0 times
    Posts
    2,175

    Default

    I didn't gave you permission to make it public. Will sue you for copyright voilation. DTIS.

Page 4 of 5 FirstFirst ... 2345 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)