Thursday, July 25, 2019

Find Factors of any number

Tags

Find Factors of any number:


find a factors of any number.



#include<stdio.h>
#include<conio.h>

void main()
{
int i,no;
clrscr();
printf("Enter Your Number :- ");
scanf("%d",&no);

printf("Your Factor Numbers Are:-\n");

for(i=1;i<=no;i++)
{
if(no%i ==0)
{
printf("%d\n",i);
}
}
getch();
}

Output:




EmoticonEmoticon