Hello Everyone, how y'all are fine. In this blog, we are gonna try to build program for Euclid's Division Lemma. It just a mathematical theorem that states that "Given positive integers a and b, there exist unique integers q and r such that a = bq +r, 0 < r < b". Here basically 'a' is dividend, 'b' is divisor, 'q' is quotient and 'r' is remainder. This is user to find the HCF(Highest Common Factor) of two numbers. We are going to build program to do exactly that. I am using C programming language, however this can be done using any programming language. So I created a new C program file using vim and I used the below code. ======= Code ======= #include <stdio.h> void main(){ int num1,num2,a,b,q,r; printf("Enter a number: "); scanf("%d",&num1); printf("Enter another number: "); scanf("%d",&num2); ...
Hello Reader,
Welcome to Planet of Codes...
I am Saurabh Mani, and I am here to share my experiences as a developer and as an IT Professional in order to help the current and future developers to become even better...