Write an interactive program using recursion for the following:
(a) To find the HCF of two given numbers.
(b) To find the GCD of two given numbers.
(c) To find the factorial of a given number.
(a) To find the HCF of two given numbers:
#include <stdio.h>
int hcf(int a, int b) {
if (b == 0) {
return a;
}
return hcf(b, a % b);
___ ______ ______ ________ ______ _____ _________ _____.
_________ ____ _________ ________ __________ __________ __________.
_____ ____ ________ ________ _____ __________.
_______ ___ __________ _____ __________ __________ ___ _____ ____.
___ _________ ___ ___ _____ _________ _______ _______ ___ _____ __________ ____.
______ _________ _____ ________ ________ ___ _________ _________ ____.
__________ __________ _______ ______ ___ ______ ___ ____ ______.
_________ _______ __________ _____ _____ _____ _________ ___ ___.
_________ _______ _________ ______ _________ ____ __________ _____.
_________ _________ ______ __________ _______ __________ _____ ____ ___.
__________ __________ ______ ______ ____ ________ ______ ____.
__________ ________ ______ ___ ___ _________ ______ _______ ___.
___ __________ ___ ______ __________ ___ ___ __________ ___ _________ ________.
__________ _______ _______ _________ _____ _______ ________ ________ __________ _______.
____ __________ _________ _____ ___ _____ _____.
________ ___ ______ _____ __________ _____ _________.
______ __________ _______ ______ __________ ___ ________ _____ ________.
___ ____ ________ __________ _____ ____ _____ _____ _________.
________ _______ ________ _______ _____ ________ _______ __________ _______.
___ __________ ________ ___ _____ _________ __________ ________ _____.
_____ ____ __________ _______ _________ ______ ______ __________ _____ __________ __________ _____.
___ _______ _______ __________ _____ __________ _____ ______ ______ _______ _______ ___.
_____ _________ _____ ______ ___ ____ _____.
_________ _____ ___ _______ ________ ____ ______ _____ _______ ________ ______.
________ __________ ________ _____ ________ ___ _________ _______.
_______ ____ _____.
Get Full Answer on WhatsApp