#include "conio.h"
#include "stdio.h"
/**********FOUND**********/
int IsPrime(int n )//這裡
{
int i, m;
m = 1;
for ( i = 2; i
if ( n%i==0 )//這裡
m = 0;
}
/****FOUND**********/
return m;//這裡
main( )
int j, k;
clrscr();
printf( "\nPlease enter an integer number between 2 and 10000: " );
scanf( "%d", &k );
printf( "\n\nThe prime factor(s) of %d is( are ):", k );
for( j = 2; j
if((!( k%j))&&( IsPrime(j))) printf( "\n %4d", j );
printf("\n");
#include "conio.h"
#include "stdio.h"
/**********FOUND**********/
int IsPrime(int n )//這裡
{
int i, m;
m = 1;
for ( i = 2; i
/**********FOUND**********/
{
if ( n%i==0 )//這裡
{
m = 0;
}
/****FOUND**********/
}
return m;//這裡
}
main( )
{
int j, k;
clrscr();
printf( "\nPlease enter an integer number between 2 and 10000: " );
scanf( "%d", &k );
printf( "\n\nThe prime factor(s) of %d is( are ):", k );
for( j = 2; j
if((!( k%j))&&( IsPrime(j))) printf( "\n %4d", j );
printf("\n");
}