Can someone help me in building a syntax for this problem
Write a program that accepts a positive integer and gives its prime factorization that expresses the integer as a product of primes.
Here's one that I did:
#include<stdio.h>
#include<conio.h>
void main()
int N,R;
clrscr();
printf("Please enter a no.:\n");
scanf("%d",&N);
{ for(R==2;R>N;R++)
if(N%R==0)
printf("%d",R)
else if(N%R!=0)
printf("%d",N);
else
printf("Invalid");
}
getch();
}
Thanks.