#include<stdio.h>
#include<conio.h>
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 numbe
any assistance
mail at :- devilllcreature@Yahoo.com
thank you
Chat with our AI personalities
syntax error
A prime symbol or number is given to a number that has only 2 factors which are itself and one
For composite numbers, only one string of factors is the longest; the prime factorization.
A factor = a number which can be divided into the given number with no remainder ie 1, 7, 49 7 * 7 = 49
A factor is any number which can be divided into the given number with no remainder. i.e 1, 2, 3, 6, 9, 18, 27, 54