回覆列表
  • 1 # 使用者3120385727362

    #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");

    }

  • 中秋節和大豐收的關聯?
  • 新車可不可以跑高速?