bsc

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

P040.c (442B)


      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 calculate HCF of two positive number */
      8 
      9 #include <stdio.h>
     10 int main()
     11 {
     12     int a, b, temp;
     13     printf("Enter two number : ");
     14     scanf("%d %d", &a, &b);
     15     while (b > 0)
     16     {
     17         temp = a;
     18         a = b;
     19         b = temp % b;
     20     }
     21     printf("HCF = %d", a);
     22     return 0;
     23 }
© 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