bsc

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

root / semester_1 / tuition-c / P039.c

P039.c (353B)


      1 /* Write a program to print all the factors of a postive integer */
      2 
      3 #include <stdio.h>
      4 
      5 int main()
      6 {
      7     int num, i;
      8     printf("Enter a number : ");
      9     scanf("%d", &num);
     10     printf("\nFactors of %d : ", num);
     11     for (i = 1; i <= num / 2; i++)
     12     {
     13         if (num % i == 0)
     14         {
     15             printf("  %d", i);
     16         }
     17     }
     18     return 0;
     19 }
© notamitgamer • Site Built: 2026-09-05 01:53:16 UTC • git-mirror commit: c170d72 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror