Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > programming-challenges

Reply
Thread Tools

programming-challenges

 
 
Ajinkya
Guest
Posts: n/a
 
      04-29-2007
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.

 
Reply With Quote
 
 
 
 
Barry
Guest
Posts: n/a
 
      04-29-2007

"Ajinkya" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> 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.


 
Reply With Quote
 
 
 
 
Kenny McCormack
Guest
Posts: n/a
 
      04-29-2007
In article <(E-Mail Removed)>,
Barry <(E-Mail Removed)> wrote:
>
>"Ajinkya" <(E-Mail Removed)> wrote in message
>news:(E-Mail Removed) roups.com...
>> 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.

 
Reply With Quote
 
Ajinkya
Guest
Posts: n/a
 
      04-30-2007
On Apr 29, 6:15 am, "Barry" <(E-Mail Removed)> wrote:
> "Ajinkya" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed) oups.com...
>
> > 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.

 
Reply With Quote
 
Ajinkya
Guest
Posts: n/a
 
      04-30-2007
On Apr 29, 6:15 am, "Barry" <(E-Mail Removed)> wrote:
> "Ajinkya" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed) oups.com...
>
> > 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.

 
Reply With Quote
 
Richard Heathfield
Guest
Posts: n/a
 
      04-30-2007
Ajinkya said:

> On Apr 29, 6:15 am, "Barry" <(E-Mail Removed)> 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.
 
Reply With Quote
 
Ajinkya
Guest
Posts: n/a
 
      05-01-2007
On Apr 30, 6:43 am, Richard Heathfield <(E-Mail Removed)> wrote:
> Ajinkya said:
>
> > On Apr 29, 6:15 am, "Barry" <(E-Mail Removed)> 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.

 
Reply With Quote
 
Richard Heathfield
Guest
Posts: n/a
 
      05-01-2007
Ajinkya said:

> On Apr 30, 6:43 am, Richard Heathfield <(E-Mail Removed)> wrote:
>> Ajinkya said:
>>
>> > On Apr 29, 6:15 am, "Barry" <(E-Mail Removed)> 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.
 
Reply With Quote
 
ak
Guest
Posts: n/a
 
      05-05-2007
On Apr 30, 9:56 pm, Richard Heathfield <(E-Mail Removed)> wrote:
> Ajinkya said:
>
>
>
>
>
> > On Apr 30, 6:43 am, Richard Heathfield <(E-Mail Removed)> wrote:
> >> Ajinkya said:

>
> >> > On Apr 29, 6:15 am, "Barry" <(E-Mail Removed)> 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

 
Reply With Quote
 
Bart van Ingen Schenau
Guest
Posts: n/a
 
      05-06-2007
ak wrote:

> On Apr 30, 9:56 pm, Richard Heathfield <(E-Mail Removed)> wrote:
>> Ajinkya said:
>>
>> > On Apr 30, 6:43 am, Richard Heathfield <(E-Mail Removed)>
>> > 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/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments