Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

¼òµ¥µÄËØÊýÅжÏC³ÌÐò

½ö¹©Ñ§Ï°Ê¹Óãº
/*********************************************
 * Name : prime.c
 * Purpose : prime (ËØÊýÅжÏ)
 * Author : zimo
 * Date : 01/21/2010
 * ******************************************/
#include<stdio.h>
int main()
{
    int m , n ;
    printf("Enter a number: ");
    scanf("%d",&n);
    for (m = 2 ;m < n ;m++)
        if (n % m ==0)
            break;
    if (m < n)
        printf("%d is divisble by %d \n", n , m);
    else
        printf("%d is prime. \n",n);
    return 0;
}


Ïà¹ØÎĵµ£º

ÓÃVisual C££±àдÆÁÄ»±£»¤³ÌÐò

Visual C#ÊÇ΢Èí¹«Ë¾ÍÆ³öµÄÐÂÒ»´ú³ÌÐò¿ª·¢ÓïÑÔ£¬ÊÇ΢Èí.Net¿ò¼ÜÖеÄÒ»¸öÖØÒª×é³É²¿·Ö¡£ÆÁÄ»±£»¤³ÌÐòÊÇÒÔscrΪÀ©Õ¹ÃûµÄ±ê×¼Windows¿ÉÖ´ÐгÌÐò¡£ÆÁÄ»±£»¤³ÌÐò²»½ö¿ÉÒÔÑÓ³¤ÏÔʾÆ÷µÄʹÓÃÊÙÃü£¬»¹¿ÉÒÔ±£»¤Ë½ÈËÐÅÏ¢¡£±¾ÎÄÏò´ó¼Ò½éÉÜÒ»¸ö.Netƽ̨ÉÏÓÃC#±àдµÄÒ»¸ö¶¯Ì¬Îı¾¼°Í¼ÐÎµÄÆÁÄ»±£»¤³ÌÐò¡£
¡¡¡¡Ò»¡¢¾ßÌåʵÏÖ²½Ö裺
¡¡¡¡£ ......

C´òÓ¡ ´óÊýµÄ ½×³Ë

 6000ÉõÖÁ10000£¬¶¼¿ÉÒÔ£¬µ«´óÓÚ6000£¬¾Í¿ªÊ¼¹öÆÁÁË¡£¡£
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main(){
int i,j,*f,tmp,c=0;
long int n,bits;
const double PI=2*asin(1.0),E=exp(1.0);
scanf("%ld",&n);
bits=(long)ceil(n*(log10(n)-log ......

C ÃæÊÔÌâÖ®ÕÒ´íÌâ


ÕÒ´íÌâ
¡¡¡¡ÊÔÌâ1£º
void test1()
{
¡¡char string[10];
¡¡char* str1 = "0123456789";
¡¡strcpy( string, str1 );
}
¡¡¡¡ÊÔÌâ2£º
void test2()
{
¡¡char string[10], str1[10];
¡¡int i;
¡¡for(i=0; i<10; i++)
¡¡{
¡¡¡¡str1[i] = 'a';
¡¡}
¡¡strcpy( string, str1 );
}
¡¡¡¡ÊÔÌâ3£º
void test3( ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ