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

C_ʹÓÃswitchÓï¾ä

 Ô´Âë:
# include <stdio.h>
 
int main()
{
    int num;
    /* ÏÂÃæ¶¨ÒåµÄ¸÷±äÁ¿£¬·Ö±ð´ú±í¸öλ£¬Ê®Î»£¬°Ùλ£¬Ç§Î»£¬Íòλ£¬Ê®ÍòλÒÔ¼°Î»Êý */
    int indiv, ten, hundred, thousand; 
    int ten_thousand, hundred_thousand, place;
 
    printf("ÇëÊäÈëÒ»¸öÕûÊý(0¡«999999)£º");
    scanf("%d", &num);
 
    /* ÅжϱäÁ¿numµÄλÊý */
    if(num > 99999)
        place = 6;
    else if(num > 9999)
        place = 5;
    else if(num > 999)
        place = 4;
    else if(num > 99)
        place = 3;
    else if(num > 9)
        place = 2;
    else
        place = 1;
    printf("place = %d\n", place);
     
    printf("ÿλÊý×ÖΪ£º");
 
    /* Çó³önumÔÚ¸÷λÉϵÄÖµ */
    hundred_thousand = num/100000;
    ten_thousand = (num - hundred_thousand*100000)/10000;
    thousand = (num - hundred_thousand*100000 - ten_thousand*10000)/1000;
    hundred = (num - hundred_thousand*100000 - ten_thousand*10000 
              - thousand*1000)/100;
    ten = (num - hundred_thousand*100000 - ten_thousand*10000 
          - thousand*1000 - hundred*100)/10;
    indiv = num - hundred_thousand*100000 - ten_thousand*10000 
            - thousand*1000 - hundred*100 - ten*10;
 
    /* Åжϱä


Ïà¹ØÎĵµ£º

B/S C/S½á¹¹¶¨ÒåµÄÏê½âºÍÇø±ð

 b/s ÊÇ brower/server ¾ÍÊÇÓÃä¯ÀÀÆ÷(Èçie)ΪӦÓóÌÐò¿Í»§¶Ë²Ù×÷·þÎñÆ÷¡£ÕâÑùÓÃä¯ÀÀÆ÷À´²Ù×÷¼òµ¥Ò×Ó㬵«ÊǶÔÊäÈëûÓкܺõÄÑéÖ¤¡£Âß¼­ÊµÏÖ²»¶à¡£±¾µØÖ»ÊÇÓÃÓÚ»ñÈ¡Êý¾ÝÈ»ºó´ó²¿·ÖÑéÖ¤ÐèÒªÌá½»·þÎñÆ÷À´Íê³É¡£
c/s ÊÇclient/server ¿Í»§¶ËÈí¼þÔòÊÇÒ»¸öÓµÓкܶàÂß¼­ÑéÖ¤µÄÈí¼þ£¬±¾µØÑéÖ¤³É¹¦ºó²ÅÌá½»·þÎñÆ÷¡£
ÎÒÕÒµ½µÄ¸ ......

C_³õʶָÕë

 Ô´Âë:
# include <stdio.h>
 
int main()
{
    /* ¶¨ÒåÒ»¸öÕûÐÎÖ¸Õëp */
    int *p;
    int begin, end;
 
    begin = 10;
    /* ¸øÖ¸Õëp¸³³õÖµ */
    p = &begin;
  & ......

C_ÅжÏÓï¾äifµÄÒ»°ãʹÓÃ

Ô´Âë:
# include <stdio.h>
     
int main()
{
        int x, y, z, mid, dec;
        printf("ÇëÈÎÒâÊäÈëÈý¸öÕûÊý£º\n");
        scanf("%d %d %d", &x, & ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ