예제 #1
0
main( )
{
	int num;
	printf("Enter a number : ");
	scanf("%d", &num);
	PFactors(num);	printf("\n");
	IPFactors(num);	printf("\n");
}/*End of main()*/
예제 #2
0
main()
{
	int num;
	printf("Enter an integer : ");
	scanf("%d",&num);
	printf("Binary Equivalent is : ");
	DecToBin(num);
	printf("Prime factors are : ");
	PFactors(num);
}/*End of main()*/
예제 #3
0
void PFactors( int num)
{
	int i = 2;
	if( num == 1 )
		return;
	while( num%i != 0 )
		i++;
	printf("%d ", i);
	PFactors(num/i);
}/*End of PFactors()*/