answersLogoWhite

0

Algorithm: to find HCF of two nos a, b 1. Find larger of two and let it l, smaller = s 2. divide l by s and find qotient (q) & remainder(r) 3. if r is 0 then s is the hcf 4. put l=s, s=r and go to step 2 int a, b; int l,s,q,r; if (a>b) {l=a;s=b;} else {l=b;s=a;} do {q= l/s; r=l%s; if (r != 0) {l=s;s=r} } while (r != 0); hcf=s; /* this variable to be output or returned as a function value as per programmer's convenience */

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

When was C - programming language - created?

C - programming language - was created in 1972.


What programming language is Android written in?

Android is programmed in the C and C++ programming language.


What do you mean by c language?

C is a programming language.


Name of object oriented programming language?

C++ is the name of a programming language.


Example of procedural programming language and object oriented programming language?

example of procedural programming are those programming language that have structure e.g basic,fortran,c++,c and pascal e.t.c


Websites to download c C programming language books?

Download 1000s of C C C++ Programming Language. http://www.guruengineers.com


Who are the ancestors of C programming language?

programming languages B and BCPL which was used to derive C


Why is programming language named C and not simply C?

I am guessing you typed the question wrong, the way I understand your question is "Why is the programming language named C++ and not C ? " The answer to this is that there is a programming language called C, and in that programming language the ++ means increment by one. So C++ is the language C improved, as such it can read and compile all C programs in addition to having other features that C does not have.


What is a programming language and with three example?

A programming language is a language in which a human can tell a machine to do something, three examples include: C, C++ and C#.


What programming language is PHP made with?

PHP is written in the C programming language.


What is the C language used for?

Programming.


What programming language is similar to C?

c++