answersLogoWhite

0


Best Answer

#include
#include
void main()
{
int n,i;
clrscr();
printf("Enter a Number:");
scanf("%d",&n);
printf("\n\nPrime Factors of %d is: ",n);
for(i=2;i<=n;i++)
{
if(n%i==0)
{
printf("%d,",i);
n=n/i;
i--;
if(n==1)
break;
}
}
getche();
}




this program will find the prime factors of a given number


any assistance


mail at :- devilllcreature@Yahoo.com


thank you

User Avatar

Wiki User

โˆ™ 2009-08-15 18:16:48
This answer is:
User Avatar
Study guides

Data Science

โžก๏ธ
See all cards
4.38
โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…
8 Reviews

Add your answer:

Earn +20 pts
Q: Prime factors a number using c language?
Write your answer...
Submit
Still have questions?
magnify glass
imp
People also asked