bsc

Comprehensive codebase and cou...
Log | Files | Refs | README | LICENSE

APC-PRAC-019.c (774B)


      1 /*
      2  * Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 12 Dec 2025
      3  * Repo: https://github.com/notamitgamer/bsc
      4  * License: MIT
      5  */
      6 
      7 /* Write a program to find hcf of two numbers */
      8 // File Name - amit0711202501.c (LAB), APC-PRAC-019.c (Local)
      9 
     10 // This code has not been compiled.
     11 // If you find any issues, please create a new issue on GitHub regarding them.
     12 // Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues
     13 
     14 #include <stdio.h>
     15 
     16 int main()
     17 {
     18     int a, b, temp, temp_a, temp_b;
     19     printf("Enter the a and b : ");
     20     scanf("%d %d", &a, &b);
     21     temp_a = a, temp_b = b;
     22     while (b > 0)
     23     {
     24         temp = a;
     25         a = b;
     26         b = temp % b;
     27     }
     28     printf("\nHCF of %d and %d is : %d\n", temp_a, temp_b, a);
     29     return 0;
     30 }
© notamitgamer • Site Built: 2026-07-21 13:58:23 UTC • git-mirror commit: 1037f62 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror