Path: csiph.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!buffer1.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Thu, 14 Jan 2021 14:35:20 -0600 Message-Id: From: Peter 'Shaggy' Haywood Subject: Re: C o m p e t i t i o n . Newsgroups: comp.programming Date: Fri, 15 Jan 2021 02:01:03 +1100 References: <36e8d16d-adbc-49f8-9b36-2344af372d52n@googlegroups.com> <7f5c420c-770d-47ab-90f6-9181ad04d343n@googlegroups.com> <048c734d-9e15-4708-ab3c-a4b861192584n@googlegroups.com> <93b7395f-168b-4010-8f63-fc36c8c7de6dn@googlegroups.com> User-Agent: KNode/0.10.9 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8Bit Lines: 95 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-w1l+Y1DR1AlpMMKKu9H7ESM4SfZ4SDDYHvItrw3X5Uf0DJEI9coPN+QPXYg5VGym5Y1EE/S/WqU6niM!96jb11POSOVXuYKeZ7EryW4E2Rwp2d4sCcbOLIs2uc+IJUElqw== X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 4586 X-Received-Bytes: 4798 Xref: csiph.com comp.programming:11783 Groovy hepcat Richard Heathfield was jivin' in comp.programming on Thu, 14 Jan 2021 07:01 am. It's a cool scene! Dig it. > On 13/01/2021 10:31, Y A wrote: >> Richard Heathfield kirjutas kolmapäev, 13. jaanuar 2021 kl 11:14:09 >> UTC+2: >>> On 12/01/2021 23:25, Y A wrote: >>>> Richard Heathfield kirjutas teisipäev, 12. jaanuar 2021 kl 18:17:01 >>>> UTC+2: >>>>> On 12/01/2021 13:17, I I wrote: >>>>> >>>>> >>>>>> I am so sorry, that You have not attended school . . . . . . >>>>> Irony is always amusing, but the more so when unintentional. >>>> >>>> Hmmmmmmmmmmmmmmmmmmmm........................... >>>> Cross sum isn't logically: sum of all digits? >>>> abcde cs=a+b+c+d+e >>> I'd never heard the term before the OP used it at the beginning of >>> this thread, so I looked it up. >>> >>> The only meaning I could find for it online was "sum of all digits" >>> (i.e. the digital root), so I calculated the sum of all digits. >>> >>> Presumably the OP (who has a different result) means something >>> different by it, but he appears unwilling to share that meaning with >>> us. >> >> OP=me > > Then you ought to know what you mean by "cross sum", so you ought to > be in a position to share that information. > > If you mean "digital root", I've already given the correct answer, > which you say is different to your answer, which means you're wrong. Just to add my two cents to this discussion, for what it's worth (somewhere between one and three cents, presumably), I wrote, compiled and ran the following program. It bears out Richard's results. ===================================================================== #include #include /* Calculate the "cross sum" (ie., digital root or sum of all the digits) for the given term. */ unsigned long cross_sum(const char *term) { unsigned long sum = 0; const char *digit; for(digit = term; '\0' != *digit; digit++) sum += (*digit - '0'); return sum; } #define BIG_ENOUGH 10 int main(void) { const char *init_term = "58349863148967341986793418678943167894317568943579812347643263461438776834177468314765864533703574653715456716465804656089576907569568456680257542768434686845796847604780607596864802468874265807426587026578406466539046579467684906749046758049663588463065836688638658768635806365889683658746862486247487652774625076485806648907696785970467957869053868763688046236880752825686569877668097860897676807746897456368844688745768468242622686282862869874986865749685796854096857706759759674569074359357697539375903576096780074367589368590356896686539"; unsigned long sum; char new_term[BIG_ENOUGH]; sum = cross_sum(init_term); sprintf(new_term, "%lu", sum); printf("sum = %lu\n", sum); while(1 < strlen(new_term)) { sum = cross_sum(new_term); sprintf(new_term, "%lu", sum); printf("sum = %lu\n", sum); } return 0; } ===================================================================== Results: sum = 2977 sum = 25 sum = 7 -- ----- Dig the NEW and IMPROVED news sig!! ----- -------------- Shaggy was here! --------------- Ain't I'm a dawg!!