/*wap to find prime factors of a given positive int num(make function “factor”

to find prime factor)*/

#include “stdio .h”

#include “conio .h”

void factor(int n);

void main()

{

int n;

clrscr();

printf(“Enter any int to find its Prime Factors:n”);

scanf(“%d”,&n);

factor(n);

getch();

}

void factor(int n)

{

int a,i,j,c=0;

printf(“prime factorn”);

for(i=2;i< =n;i++)
{
c=0;
if(n%i==0)
{
a=i;
for(j=2;j