programming-challenges

Discussion in 'C Programming' started by Ajinkya, Apr 29, 2007.

  1. Ajinkya

    Ajinkya Guest

    Me along with some of my friends have formed a programming group on
    google to discuss programming
    problem approaches....
    Do join it will be helpful to all beginners and experts same.

    Here is the link to it : http://groups.google.co.in/group/programming-challenges


    Ciao,
    Ajinkya.
     
    Ajinkya, Apr 29, 2007
    #1
    1. Advertising

  2. Ajinkya

    Barry Guest

    "Ajinkya" <> wrote in message
    news:...
    > Me along with some of my friends have formed a programming group on
    > google to discuss programming
    > problem approaches....
    > Do join it will be helpful to all beginners and experts same.
    >
    > Here is the link to it :
    > http://groups.google.co.in/group/programming-challenges
    >
    >
    > Ciao,
    > Ajinkya.
    >


    Judging by the couple of discussions I looked at on your site,
    you have never read c.l.c. Better to shut it down than to
    propogate such bad ideas.
     
    Barry, Apr 29, 2007
    #2
    1. Advertising

  3. In article <>,
    Barry <> wrote:
    >
    >"Ajinkya" <> wrote in message
    >news:...
    >> Me along with some of my friends have formed a programming group on
    >> google to discuss programming
    >> problem approaches....
    >> Do join it will be helpful to all beginners and experts same.
    >>
    >> Here is the link to it :
    >> http://groups.google.co.in/group/programming-challenges
    >>
    >>
    >> Ciao,
    >> Ajinkya.
    >>

    >
    >Judging by the couple of discussions I looked at on your site,
    >you have never read c.l.c. Better to shut it down than to
    >propogate such bad ideas.


    It is probably not possible for him to shut down clc. Usenet being what
    it is.

    But I agree about it (clc) propogating (lots of) bad ideas. Not much
    you can do about it, though.
     
    Kenny McCormack, Apr 29, 2007
    #3
  4. Ajinkya

    Ajinkya Guest

    On Apr 29, 6:15 am, "Barry" <> wrote:
    > "Ajinkya" <> wrote in message
    >
    > news:...
    >
    > > Me along with some of my friends have formed a programming group on
    > > google to discuss programming
    > > problem approaches....
    > > Do join it will be helpful to all beginners and experts same.

    >
    > > Here is the link to it :
    > >http://groups.google.co.in/group/programming-challenges

    >
    > > Ciao,
    > > Ajinkya.

    >
    > Judging by the couple of discussions I looked at on your site,
    > you have never read c.l.c. Better to shut it down than to
    > propogate such bad ideas.


    Please dont say that to me....there are ACM ICPC winners on the group
    who post regularly.
    I think they have not read clc(thats what you meant?) what say?

    Ciao,
    Ajinkya.
     
    Ajinkya, Apr 30, 2007
    #4
  5. Ajinkya

    Ajinkya Guest

    On Apr 29, 6:15 am, "Barry" <> wrote:
    > "Ajinkya" <> wrote in message
    >
    > news:...
    >
    > > Me along with some of my friends have formed a programming group on
    > > google to discuss programming
    > > problem approaches....
    > > Do join it will be helpful to all beginners and experts same.

    >
    > > Here is the link to it :
    > >http://groups.google.co.in/group/programming-challenges

    >
    > > Ciao,
    > >Ajinkya.

    >
    > Judging by the couple of discussions I looked at on your site,
    > you have never read c.l.c. Better to shut it down than to
    > propogate such bad ideas.


    Please specify what you found as a "bad idea".....

    Ajinkya.
     
    Ajinkya, Apr 30, 2007
    #5
  6. Ajinkya said:

    > On Apr 29, 6:15 am, "Barry" <> wrote:
    >>
    >> Judging by the couple of discussions I looked at on your site,
    >> you have never read c.l.c. Better to shut it down than to
    >> propogate such bad ideas.

    >
    > Please dont say that to me....there are ACM ICPC winners on the group
    > who post regularly.


    If they're that good, why doesn't their code compile and work properly?

    First example I found:

    #include <stdio.h>
    #include <conio.h>


    int main()
    {
    int TotalSteps=0,NoOfTwoSteps,NoOfOneSteps,TotalWays=1;
    int i;


    printf ("\nPlease enter the number of steps: ");
    scanf ("%d",&TotalSteps);


    NoOfTwoSteps=TotalSteps/2;


    for (i=1;i<=NoOfTwoSteps;i++)
    {
    int Factorial1,Factorial2,Factorial3;
    int TotalStep,j;
    NoOfOneSteps = TotalSteps - i * 2;


    Factorial1=Factorial2=Factorial3=1;


    for (j=2;j<=NoOfOneSteps+i;j++)
    Factorial1*=j;


    for (j=2;j<=NoOfOneSteps;j++)
    Factorial2*=j;


    for (j=2;j<=i;j++)
    Factorial3*=j;


    TotalStep = Factorial1/(Factorial2*Factorial3);
    TotalWays+=TotalStep;
    }


    printf("\nTotal Ways are: %d",TotalWays);


    getch();
    return 0;

    When we compile this, we get:

    foo.c:2: conio.h: No such file or directory
    make: *** [foo.o] Error 1

    Removing that line, we get:

    foo.c:4: warning: function declaration isn't a prototype
    foo.c: In function `main':
    foo.c:46: warning: implicit declaration of function `getch'
    foo.c:49: parse error at end of input
    make: *** [foo.o] Error 1

    When we remove the getch and fix the missing brace, we get a program
    which behaves thusly:

    me@here> ./foo

    Please enter the number of steps: ELEPHANT

    Total Ways are: 1me@here>

    Not good.

    --
    Richard Heathfield
    "Usenet is a strange place" - dmr 29/7/1999
    http://www.cpax.org.uk
    email: rjh at the above domain, - www.
     
    Richard Heathfield, Apr 30, 2007
    #6
  7. Ajinkya

    Ajinkya Guest

    On Apr 30, 6:43 am, Richard Heathfield <> wrote:
    > Ajinkya said:
    >
    > > On Apr 29, 6:15 am, "Barry" <> wrote:

    >
    > >> Judging by the couple of discussions I looked at on your site,
    > >> you have never read c.l.c. Better to shut it down than to
    > >> propogate such bad ideas.

    >
    > > Please dont say that to me....there are ACM ICPC winners on the group
    > > who post regularly.

    >
    > If they're that good, why doesn't their code compile and work properly?
    >
    > First example I found:
    >
    > #include <stdio.h>
    > #include <conio.h>
    >
    > int main()
    > {
    > int TotalSteps=0,NoOfTwoSteps,NoOfOneSteps,TotalWays=1;
    > int i;
    >
    > printf ("\nPlease enter the number of steps: ");
    > scanf ("%d",&TotalSteps);
    >
    > NoOfTwoSteps=TotalSteps/2;
    >
    > for (i=1;i<=NoOfTwoSteps;i++)
    > {
    > int Factorial1,Factorial2,Factorial3;
    > int TotalStep,j;
    > NoOfOneSteps = TotalSteps - i * 2;
    >
    > Factorial1=Factorial2=Factorial3=1;
    >
    > for (j=2;j<=NoOfOneSteps+i;j++)
    > Factorial1*=j;
    >
    > for (j=2;j<=NoOfOneSteps;j++)
    > Factorial2*=j;
    >
    > for (j=2;j<=i;j++)
    > Factorial3*=j;
    >
    > TotalStep = Factorial1/(Factorial2*Factorial3);
    > TotalWays+=TotalStep;
    > }
    >
    > printf("\nTotal Ways are: %d",TotalWays);
    >
    > getch();
    > return 0;
    >
    > When we compile this, we get:
    >
    > foo.c:2: conio.h: No such file or directory
    > make: *** [foo.o] Error 1
    >
    > Removing that line, we get:
    >
    > foo.c:4: warning: function declaration isn't a prototype
    > foo.c: In function `main':
    > foo.c:46: warning: implicit declaration of function `getch'
    > foo.c:49: parse error at end of input
    > make: *** [foo.o] Error 1
    >
    > When we remove the getch and fix the missing brace, we get a program
    > which behaves thusly:
    >
    > me@here> ./foo
    >
    > Please enter the number of steps: ELEPHANT
    >
    > Total Ways are: 1me@here>
    >
    > Not good.
    >
    > --
    > Richard Heathfield
    > "Usenet is a strange place" - dmr 29/7/1999http://www.cpax.org.uk
    > email: rjh at the above domain, - www.


    uh?....we dont discuss codes there....the code was just to support the
    algorithm used. And i know "conio.h" is not in ANSI standards....but
    as the program was compiled in turboC it worked out there....it will
    definetely not work on unix systems as "conio.h" cannot be used in gcc
    as gcc is accord to ANSI....thanks i will see to it that ppl will not
    use that further(but i cant stop them from doing it....we can only
    comment)

    Ciao,
    Ajinkya.
     
    Ajinkya, May 1, 2007
    #7
  8. Ajinkya said:

    > On Apr 30, 6:43 am, Richard Heathfield <> wrote:
    >> Ajinkya said:
    >>
    >> > On Apr 29, 6:15 am, "Barry" <> wrote:

    >>
    >> >> Judging by the couple of discussions I looked at on your site,
    >> >> you have never read c.l.c. Better to shut it down than to
    >> >> propogate such bad ideas.

    >>
    >> > Please dont say that to me....there are ACM ICPC winners on the
    >> > group who post regularly.

    >>
    >> If they're that good, why doesn't their code compile and work
    >> properly?
    >>

    > uh?....we dont discuss codes there....the code was just to support the
    > algorithm used. And i know "conio.h" is not in ANSI standards....but
    > as the program was compiled in turboC it worked out there....


    Oh, I see - so your site is for Turbo C users only? Thank you - I'll
    make a note.

    --
    Richard Heathfield
    "Usenet is a strange place" - dmr 29/7/1999
    http://www.cpax.org.uk
    email: rjh at the above domain, - www.
     
    Richard Heathfield, May 1, 2007
    #8
  9. Ajinkya

    ak Guest

    On Apr 30, 9:56 pm, Richard Heathfield <> wrote:
    > Ajinkya said:
    >
    >
    >
    >
    >
    > > On Apr 30, 6:43 am, Richard Heathfield <> wrote:
    > >> Ajinkya said:

    >
    > >> > On Apr 29, 6:15 am, "Barry" <> wrote:

    >
    > >> >> Judging by the couple of discussions I looked at on your site,
    > >> >> you have never read c.l.c. Better to shut it down than to
    > >> >> propogate such bad ideas.

    >
    > >> > Please dont say that to me....there are ACM ICPC winners on the
    > >> > group who post regularly.

    >
    > >> If they're that good, why doesn't their code compile and work
    > >> properly?

    >
    > > uh?....we dont discuss codes there....the code was just to support the
    > > algorithm used. And i know "conio.h" is not in ANSI standards....but
    > > as the program was compiled in turboC it worked out there....

    >
    > Oh, I see - so your site is for Turbo C users only? Thank you - I'll
    > make a note.
    >
    > --
    > Richard Heathfield
    > "Usenet is a strange place" - dmr 29/7/1999http://www.cpax.org.uk
    > email: rjh at the above domain, - www.- Hide quoted text -
    >
    > - Show quoted text -


    Not at all.....but i cant stop people from using TurboC
     
    ak, May 5, 2007
    #9
  10. ak wrote:

    > On Apr 30, 9:56 pm, Richard Heathfield <> wrote:
    >> Ajinkya said:
    >>
    >> > On Apr 30, 6:43 am, Richard Heathfield <>
    >> > wrote:

    >>
    >> Oh, I see - so your site is for Turbo C users only? Thank you - I'll
    >> make a note.

    >
    > Not at all.....but i cant stop people from using TurboC


    That's true, but you can stop people from posting code that works *only*
    on Turbo C.

    In a group that is not specifically focussed on using one particular
    compiler, the contributers should make an effort that the programs they
    provide can be used on any compiler that the readers might use.
    If you restrict yourself to the features provided by the ANSI/ISO C
    standard, that will be automatically the case.

    Bart v Ingen Schenau
    --
    a.c.l.l.c-c++ FAQ: http://www.comeaucomputing.com/learn/faq
    c.l.c FAQ: http://www.eskimo.com/~scs/C-faq/top.html
    c.l.c++ FAQ: http://www.parashift.com/c -faq-lite/
     
    Bart van Ingen Schenau, May 6, 2007
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tony Burch
    Replies:
    0
    Views:
    757
    Tony Burch
    Jul 15, 2004
  2. Romeo Colacitti

    Programming challenges leading to a job?

    Romeo Colacitti, Jun 26, 2006, in forum: C Programming
    Replies:
    11
    Views:
    488
  3. Replies:
    18
    Views:
    835
    Edwin
    Dec 9, 2008
  4. astral orange
    Replies:
    18
    Views:
    4,520
    Jon Clements
    Dec 1, 2009
  5. Replies:
    15
    Views:
    200
Loading...

Share This Page