bsc

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

P039.c (489B)


      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 print all the factors of a postive integer */
      8 
      9 #include <stdio.h>
     10 
     11 int main()
     12 {
     13     int num, i;
     14     printf("Enter a number : ");
     15     scanf("%d", &num);
     16     printf("\nFactors of %d : ", num);
     17     for (i = 1; i <= num / 2; i++)
     18     {
     19         if (num % i == 0)
     20         {
     21             printf("  %d", i);
     22         }
     23     }
     24     return 0;
     25 }
© 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