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

CÅжÏÄê·ÝÊÇ·ñΪÈòÄê

1¡¢±àдһ¸ö²¼¶ûº¯Êýint is_leap_year(int year)£¬ÅжϲÎÊýyearÊDz»ÊÇÈòÄê¡£Èç¹ûijÄê·ÝÄܱ»4Õû³ý£¬µ«²»Äܱ»100Õû³ý£¬ÄÇôÕâÒ»Äê¾ÍÊÇÈòÄ꣬´ËÍ⣬Äܱ»400Õû³ýµÄÄê·ÝÒ²ÊÇÈòÄê¡£
#include <stdio.h>
int is_leap_year(int);
int main(){
int i,j;
printf("please input a number:");
scanf("%d",&i);
printf("i=%d\n",i);
j = is_leap_year(i);
if (j){
printf("is leap year\n");
}
else{
printf ("not leap year\n");
}
}
int is_leap_year(int year){
if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0)
return 1;
else
return 0;
}
ÔÚis_leap_yearº¯ÊýÖУ¬¸ù¾ÝÅжÏÐÅÏ¢½øÐÐÅжϡ£½øÐзµ»ØÈç¹ûÈòÄê·µ»Ø1£¬²»ÊÇÈòÄê·µ»Ø0£»Ôڴ˺¯ÊýÖÐÉæ¼°µ½ÓÅÏȼ¶µÄÎÊÌâ¡£


Ïà¹ØÎĵµ£º

¡¾×ª¡¿c´úÂëÓÅ»¯


1¡¢Ñ¡ÔñºÏÊʵÄËã·¨ºÍÊý¾Ý½á¹¹
Ñ¡ÔñÒ»ÖÖºÏÊʵÄÊý¾Ý½á¹¹ºÜÖØÒª£¬Èç¹ûÔÚÒ»¶ÑËæ»ú´æ·ÅµÄÊýÖÐʹÓÃÁË´óÁ¿µÄ²åÈëºÍɾ³ýÖ¸ÁÄÇʹÓÃÁ´±íÒª¿ìµÃ¶à¡£Êý×éÓëÖ¸ÕëÓï¾ä¾ßÓÐÊ®·ÖÃÜÇеĹØϵ£¬Ò»°ãÀ´Ëµ£¬Ö¸Õë±È½ÏÁé»î¼ò½à£¬¶øÊý×éÔò±È½ÏÖ±¹Û£¬ÈÝÒ×Àí½â¡£¶ÔÓڴ󲿷ֵıàÒëÆ÷£¬Ê¹ÓÃÖ¸Õë±ÈʹÓÃÊý×éÉú³ÉµÄ´úÂë¸ü¶Ì£¬Ö´ÐÐЧÂʸü¸ß¡£
ÔÚÐí¶à ......

¹¹½¨×Ô¼ºµÄC/C++²å¼þ¿ª·¢¿ò¼Ü

——³õ²½ÉèÏë
¡¡×î½üÒ»Ö±ÔÚѧϰOSGI·½ÃæµÄ֪ʶ¡£ÂòÁËÒ»±¾¡¶OSGIÔ­ÀíºÍ×î¼Ñʵ¼ù¡·£¬¿ÉÊÇ»¹Ã»Óе½¡£Òź¶µÄÊÇ£¬OSGIÄ¿Ç°µÄ¼¸¸ö¿ªÔ´¿ò¼ÜÖ»Ö§³ÖJava£¬¶ÔCºÍC++¶¼²»Ö§³ÖµÄ¡£¿ÉϧÎÒÃǹ«Ë¾Ä¿Ç°Ö÷ÒªµÄ¿ª·¢ÓïÑÔ»¹ÊÇcºÍc++£¬¼´±ãÊÇÒý½øOSGI£¬ËùµÃµÄºÃ´¦·¶Î§ÓÐÏÞ¡£¶øÎÒ¶ÔËÉÉ¢ñîºÏµÄÄ£¿é»¯¿ª·¢ÏòÍùÒѾᣲéÁËÒ»ÏÂOSGI¶ÔC++Ö§ ......

¡¾C\C++ÓïÑÔÈëÃÅƪ¡¿ Îļþ²Ù×÷(תÌû)

×î½üʵÔÚÊÇ̫æÁË£¬ÕâƪÕûÕû¾ÍÍƳÙÁË1¸öÔÂÁË£¬ÊµÔÚÊǶԲ»Æð¡£Ö®Ç°±¾´òËãÕâ¸öÄ£¿é¾Í½áÊøÁË£¬Îļþ²Ù×÷¾Í²»Ð´ÁË£¬µ«ÊÇÎļþ²Ù×÷ÓÖÊÇÒ»¸öºÜÖØÒªµÄ¶«Î÷£¬¶øÇÒÒ²¸ÕºÃÄܹ»×ܽá֮ǰÎÒÃÇѧϰµÄËùÓÐ֪ʶ¡£Í¬Ê±Ò²ÎªÁ˽«Îļþ²Ù×÷Õâ¸ö³õѧÕßÈÏΪºÜÉñÃصĶ«Î÷¸ø±¾ÖÊ»¯¡£Òò´Ë£¬±¾Æª½«ÖðÒ»½éÉÜCÓïÑÔµÄÎļþ²Ù×÷¡££¨±¾Ä£¿éµÄÃüÃû±¾À´ÊÇÏëC\C++Ò ......

¶Á¡¶CºÍÖ¸Õë¡·±Ê¼ÇÕªÒª¡¾5¡¿

2010-04-09
µÚÊ®ËÄÕ   Ô¤´¦ÀíÆ÷
1¡¢#define Ìæ»»
ÔÚ³ÌÐòÖÐÀ©Õ¹#define¶¨Òå·ûºÅºÍºêʱ£¬ÐèÒªÉæ¼°¼¸¸ö²½Ö裻
¢Ù¡¢ÔÚµ÷Óúêʱ£¬Ê×ÏȶԲÎÊý½øÐмì²é£¬¿´¿´ÊÇ·ñ°üº¬ÁËÈκÎÓÉ#define¶¨ÒåµÄ·ûºÅ£¬Èç¹ûÊÇ£¬ËüÃÇÊ×Ïȱ»Ìæ»»£»
¢Ú¡¢Ìæ»»ÎļþËæºó±»²åÈëµ½³ÌÐòÖÐÔ­À´ÎļþµÄλÖ㬶ÔÓں꣬²ÎÊýÃû±»ËûÃǵÄÖµÌæ´ú£»
¢Û¡¢×î ......

×Ô¼º¶¯ÊÖдһ¸öÅжÏÍøÖ·ºÏ·¨µÄC\C++µÄÕýÔò±í´ïʽ³ÌÐò

#include<stdio.h>
#include<regex.h>
int main(int argc, char** argv)
{
if(IsLegalPage("http://www.baidu.com"))
printf("¸ÃÍøÒ³ºÏ·¨\n");
else printf("¸ÃÍøÒ³²»ºÏ·¨£¡£¡£¡\n");
return 0;
}
/* º¯Êý˵Ã÷£ºÅжÏÍøÒ³ÊÇ·ñºÏ·¨
* ÊäÈë²ÎÊý£ºÐèÒªÅжϵÄÍø ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ