Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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#Óëc¡¢javaµÄ¹Øϵ

 C#´ÓJava¼Ì³Ð¶øÀ´µÄÌصã
¡¡¡¡Àà:ÔÚC#ÖÐÀàµÄÉêÃ÷ÓëJavaºÜÏàËÆ.ÕâÊǺÏÀíµÄÒòΪ¾­Ñé¸æËßÎÒÃÇJavaÄ£Ð͹¤×÷µÃºÜºÃ.JavaµÄ¹Ø¼ü×ÖimportÒѾ­±»Ìæ»»³Éusing,ËüÆðµ½ÁËͬÑùµÄ×÷ÓÃ.Ò»¸öÀ࿪ʼִÐеÄÆðµãÊǾ²Ì¬·½·¨Main().ÏÂÃæµÄHello World³ÌÐòչʾÁË»ù±¾µÄÐÎʽ:
¡¡¡¡using System;
¡¡¡¡class Hello
¡¡¡¡{
¡¡¡¡static v ......

½«Àà³ÉÔ±º¯ÊýÓÃ×öC»Øµ÷º¯Êý

Ìá³öÎÊÌ⣺
»Øµ÷º¯ÊýÊÇ»ùÓÚC±à³ÌµÄWindows SDKµÄ¼¼Êõ£¬²»ÊÇÕë¶ÔC++µÄ£¬³ÌÐòÔ±¿ÉÒÔ½«Ò»¸öCº¯ÊýÖ±½Ó×÷Ϊ»Øµ÷º¯Êý£¬µ«ÊÇÈç¹ûÊÔͼֱ½ÓʹÓÃC++µÄ³ÉÔ±º¯Êý×÷Ϊ»Øµ÷º¯Êý½«·¢Éú´íÎó£¬ÉõÖÁ±àÒë¾Í²»ÄÜͨ¹ý¡£
·ÖÎöÔ­Òò£º
ÆÕͨµÄC++³ÉÔ±º¯Êý¶¼Òþº¬ÁËÒ»¸ö´«µÝº¯Êý×÷Ϊ²ÎÊý£¬Ò༴“this”Ö¸Õ룬C++ͨ¹ý´«µÝÒ»¸öÖ¸Ïò×ÔÉíµÄÖ¸ ......

C_¹ØϵºÍÂß¼­ÔËËã

 Ô´Âë:
# include <stdio.h>
 
int main()
{
    /* ¶¨ÒåÒ»¸öÕûÊýÀàÐ͵ıäÁ¿£¬ÓÃÀ´´æ·ÅºóÃæËãʽµÄÖµ */
    int logic;    
 
    int a = 1;
    int b = 2;
    int c = 3;
 
&n ......

C_×ÔÔöÓë×Ô¼õ

 Ô´Âë:
# include <stdio.h>
 
int main()
{
    int i, j, k;
    int m, n, p;
 
    i = 8;
    j = 10;
    k = 12;
    
    /* ×ÔÔöÔÚ²Ù×÷Êý֮ǰ */
   ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ