Skip to content

Commit

Permalink
Factors of the given Number
Browse files Browse the repository at this point in the history
  • Loading branch information
KeerthanaPravallika authored May 25, 2021
1 parent 1a93130 commit f5a5afc
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Factors
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include <stdio.h>

int main()
{
int num,i;
printf("Enter the number : ");
scanf("%d",&num);
printf("Factors are ");
for(i=1;i<=num/2;i++)
{
if(num % i == 0)
printf("%d ",i);
}
printf("%d",num);

return 0;
}

0 comments on commit f5a5afc

Please sign in to comment.