Question
Write an algorithm to find the HCF (Highest Common Factor) of the two numbers entered by a user. Transform your algorithm to a C program, support your program with suitable comments.
Answer :
Word Count : 298
_____ __________ _________ ________ __________ _______ ____ ___ _________ ______ ___.
__________ ____ __________ ____ _______ _________ ______ __________ _____ ________.
____ ______ ________ _______ _________ _________ _______ _________.
________ _____ ______ ____ ________ __________ _______ ____.
________ _______ ________ ___ ________ ________.
_______ _________ ______ _______ _________ ______ ______.
_______ ___ ____ ___ _______.
_______ ____ ______ _________ _______ _________ _____ ________ ________.
__________ ____ _______ _______ ___ _________.
_______ ____ ___ _______ ___ _________ _________ ________ ___ _____.
_______ ______ ____ __________ _________ _______ _________ __________ ___ ____ _________.
_______ ______ __________ __________ ______ ____ ___ ______.
_________ _______ _____ __________ ________ ___.
________ ____ _______ _______ ___.
___ _______ __________ ___ ________ _____ _____ _____ _______ ________ _______.
___ __________ ___ ____ _________.
___ ___ _____ __________ __________ ____ _____ ___ ___ __________ ____ ____.
______ ____ __________ ____ ____ __________ _________ _______ ______.
___ __________ _______ _______ _______ __________ ____ _____ ___ ______.
_________ ________ ____ ____ _______.
____ _____ ___ __________ ___ _______ ______ _________ __________ ___.
________ _____ ________ _______ _______ _______ _________ _____ ______.
____ _______ ________ ______ ____ ____ ________ _________ _______ ___ __________.
______ ______ __________ ____ _______ ____ ____ __________.
________ ________ ________ ______ ________ _________ _______ ____ _____ ________ _____.
________ ______ ___ _____ ____ ________ _________ ______ __________ __________.
_____ ______ _______ ___ ___ ________ ___ _________ _________ _____ ____.
Skip in 10
Algorithm to find the HCF of two numbers:
1. Start
2. Input the first number (num1) from the user
3. Input the second number (num2) from the user
4. Set minNum as the minimum of num1 and num2
5. Initialize a variable hcf to 1
6. Iterate from 1 to minNum:
a. If both num1 and num2 are divisible
__________ ____ __________ ____ _______ _________ ______ __________ _____ ________.
____ ______ ________ _______ _________ _________ _______ _________.
________ _____ ______ ____ ________ __________ _______ ____.
________ _______ ________ ___ ________ ________.
_______ _________ ______ _______ _________ ______ ______.
_______ ___ ____ ___ _______.
_______ ____ ______ _________ _______ _________ _____ ________ ________.
__________ ____ _______ _______ ___ _________.
_______ ____ ___ _______ ___ _________ _________ ________ ___ _____.
_______ ______ ____ __________ _________ _______ _________ __________ ___ ____ _________.
_______ ______ __________ __________ ______ ____ ___ ______.
_________ _______ _____ __________ ________ ___.
________ ____ _______ _______ ___.
___ _______ __________ ___ ________ _____ _____ _____ _______ ________ _______.
___ __________ ___ ____ _________.
___ ___ _____ __________ __________ ____ _____ ___ ___ __________ ____ ____.
______ ____ __________ ____ ____ __________ _________ _______ ______.
___ __________ _______ _______ _______ __________ ____ _____ ___ ______.
_________ ________ ____ ____ _______.
____ _____ ___ __________ ___ _______ ______ _________ __________ ___.
________ _____ ________ _______ _______ _______ _________ _____ ______.
____ _______ ________ ______ ____ ____ ________ _________ _______ ___ __________.
______ ______ __________ ____ _______ ____ ____ __________.
________ ________ ________ ______ ________ _________ _______ ____ _____ ________ _____.
________ ______ ___ _____ ____ ________ _________ ______ __________ __________.
_____ ______ _______ ___ ___ ________ ___ _________ _________ _____ ____.
IGNOU ACADEMY
Your IGNOU journey, made easier.
- Solved Assignments
- Study Notes
- Guess Papers
- Question Papers
Continue Reading — It's Free
Sign in with Google to unlock more of this answer.
✓ Free access
✓ Unlock up to 60% of the answer
✓ No payment required
✓ Unlock up to 60% of the answer
✓ No payment required
Quick Google sign-in. No separate registration form.