Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #55560

Re: www.equestionanswers.com - C,C++, VC++,MFC,COM,DCOM, DLL question and answers for interviews and self-study

From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.lang.c
Subject Re: www.equestionanswers.com - C,C++, VC++,MFC,COM,DCOM, DLL question and answers for interviews and self-study
Date 2014-12-29 00:57 +0000
Organization A noiseless patient Spider
Message-ID <878uhrb7c8.fsf@bsb.me.uk> (permalink)
References (1 earlier) <n0h0aadudc4ikp2cdp4umi3f7bea53315j@4ax.com> <87d273czw7.fsf@bsb.me.uk> <d754b314-f1e5-4b34-913c-5e4626bca1b9@googlegroups.com> <87ppb3biyh.fsf@bsb.me.uk> <gV_nw.239857$Cy6.150958@fx23.am4>

Show all headers | View raw


BartC <bc@freeuk.com> writes:

> On 28/12/2014 20:47, Ben Bacarisse wrote:
>> bert <bert.hutchings@btinternet.com> writes:
>>
>>> On Sunday, 28 December 2014 19:56:02 UTC, Ben Bacarisse  wrote:
>>>> ... Take a look at the highest common factor program.
>>>
>>> Your age is showing, Ben, and so would mine.  Currently,
>>> the preferred terminology is greatest common divisor.
>>
>> It's also my preferred term (does that make me young again?!), but I
>> thought I'd stick with the term used by the site in question so people
>> could find it (though, really, don't bother).
>
> Too late. But I couldn't find it using either 'highest' or 'greatest'
> on the page of C questions. (I had to use the search box.)

Odd.  Maybe we are looking at different pages.

> What was the problem with the code anyway, the algorithm? It worked,
> sort of (it's slow for big numbers, and returns garbage when there is
> no gcd >= 2 or both operands are negative).

I'd think that would be enough for anyone!  The algorithm is
preposterous, and it fails more often than it succeeds, but I see you
got right to the heart of the problem...

> It does however use scanf("%d %d",&a,&b) which I had more of an issue
> with: it seems the separator has to be white-space only, you can't use
> a comma. Another mark against scanf.

Shocking!  What would you'd do instead?

-- 
Ben.

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

www.equestionanswers.com - C,C++, VC++,MFC,COM,DCOM, DLL question and answers for interviews and self-study EQuestionAnswers Inc <equestionanswers@gmail.com> - 2014-12-27 22:41 -0800
  Re: www.equestionanswers.com - C,C++, VC++,MFC,COM,DCOM, DLL question and answers for interviews and self-study Barry Schwarz <schwarzb@dqel.com> - 2014-12-28 10:02 -0800
    Re: www.equestionanswers.com - C,C++, VC++,MFC,COM,DCOM, DLL question and answers for interviews and self-study Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-12-28 19:55 +0000
      Re: www.equestionanswers.com - C,C++, VC++,MFC,COM,DCOM, DLL question and answers for interviews and self-study bert <bert.hutchings@btinternet.com> - 2014-12-28 12:41 -0800
        Re: www.equestionanswers.com - C,C++, VC++,MFC,COM,DCOM, DLL question and answers for interviews and self-study Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-12-28 20:47 +0000
          Re: www.equestionanswers.com - C,C++, VC++,MFC,COM,DCOM, DLL question and answers for interviews and self-study BartC <bc@freeuk.com> - 2014-12-28 21:48 +0000
            Re: www.equestionanswers.com - C,C++, VC++,MFC,COM,DCOM, DLL question and answers for interviews and self-study Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-12-29 00:57 +0000
            Re: www.equestionanswers.com - C,C++, VC++,MFC,COM,DCOM, DLL question and answers for interviews and self-study Phil Carmody <pc+usenet@asdf.org> - 2015-01-03 15:08 +0200
              Re: www.equestionanswers.com - C,C++, VC++,MFC,COM,DCOM, DLL question and answers for interviews and self-study BartC <bc@freeuk.com> - 2015-01-03 13:31 +0000
                Re: www.equestionanswers.com - C,C++, VC++,MFC,COM,DCOM, DLL question and answers for interviews and self-study Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-01-03 15:13 +0000
                Re: www.equestionanswers.com - C,C++, VC++,MFC,COM,DCOM, DLL question and answers for interviews and self-study BartC <bc@freeuk.com> - 2015-01-03 21:23 +0000
      Re: www.equestionanswers.com - C,C++, VC++,MFC,COM,DCOM, DLL question and answers for interviews and self-study Dr Nick <nospam-4@temporary-address.org.uk> - 2014-12-29 09:45 +0000
        Re: www.equestionanswers.com - C,C++, VC++,MFC,COM,DCOM, DLL question and answers for interviews and self-study Ike Naar <ike@iceland.freeshell.org> - 2014-12-29 09:57 +0000
          Re: www.equestionanswers.com - C,C++, VC++,MFC,COM,DCOM, DLL question and answers for interviews and self-study bert <bert.hutchings@btinternet.com> - 2014-12-29 04:07 -0800
            Re: www.equestionanswers.com - C,C++, VC++,MFC,COM,DCOM, DLL question and answers for interviews and self-study Phil Carmody <pc+usenet@asdf.org> - 2015-01-03 15:43 +0200
    Re: www.equestionanswers.com - C,C++, VC++,MFC,COM,DCOM, DLL question and answers for interviews and self-study Jorgen Grahn <grahn+nntp@snipabacken.se> - 2015-01-03 13:57 +0000
      Re: www.equestionanswers.com - C,C++, VC++,MFC,COM,DCOM, DLL question and answers for interviews and self-study Greg Martin <greg.at.softsprocket@dot.com> - 2015-01-03 19:46 +0000

csiph-web