TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: All
from: Paul Wankadia
date: 1996-09-26 14:41:04
subject: Maths routines

Hi, all.  I found a Euclidean algorithm for finding the HCF of two numbers

and decided to code it :



int Find_HCF(int X, int Y) {

        if (X > Y) return (Find_HCF(Y, X));

        if ((Y % X) == 0) return X;

        return Find_HCF((Y % X), X);

}



Do any of you have similar sorts of routines (including that one for the

Sieve of Eratosthenes(sp?) that was discussed recently) ???  Source please :)



Chow.



Junyer Hakker.



--- PPoint 2.00

* Origin: Junyer's Workshop (3:640/772.3)
SEEN-BY: 50/99 620/243 623/630 640/201 206 216 217 222 230 238 254 297 305
SEEN-BY: 640/309 370 375 386 531 535 547 739 750 772 773 820 821 822 823 890
SEEN-BY: 640/895 937 711/401 409 410 413 430 808 809 932 934 712/515 713/888
SEEN-BY: 714/906 800/1
@PATH: 640/772 531 201 820 711/409 808 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.