α׷

 3204, 1/161 ȸ  α  
   nsh009
   ڿ if

http://www.hackerschool.org/HS_Boards/zboard.php?id=QNA_programming&no=6315 []


              

               int x,y;
        char cal_operator;

        char inexit[5];
        ////// ⺯ κ.//////
        printf("\n Welcome to the calculator. \n");

        while(1)
        {
                printf("If you want to exit this function input 'exit'. \n");
                printf("Continue: press any key and enter. \n");
                fflush(stdin);
                scanf("%s", &inexit);
                /////̺κ
                                      if(inexit=="exit\0")
                        break;

                printf("Input x value: ");
                scanf("%d", &x);
                printf("Input y value: ");
                scanf("%d", &y);
                fflush(stdin);
                printf("Select the operator, '+' '-' '*' '/' '%' \n");
                scanf("%c", &cal_operator);
                             //   ڵ //

ڵ Ϻ Դϴ. exit while ϴ ǵ.. if κп inexit exit Ǵµ ʰ dz׿!

  Hit : 9746     Date : 2013/03/13 02:55



    
gijun0102 C ڿ == ȵ˴ϴ. C++ string Ŭ ̿ϸ Ǵµ C Ƿ strcmp() Լ ˴ϴ 2013/03/15  
6 ˰ִ° ´ 𸣰 \0 ּŵ ǰ " " ڿ NULL °ɷ ˰ֽϴ. 2013/03/15  
youngim0405 string Լ ȹŰͰ zzŤ Բ Ͻŵ C == ڿ 񱳰 ȵ˴ϴ...Java C++ Ǵµ . ׷ ڿ Ͻð Ƕ #include <string.h> ȣϼż string Լ Ҽ ְڲ YֽŴ strcmp(char const* a, char const*b) ϼż ڵֽø ǰڽϴ.

strcmp ڿ 0 ϰ ٸ ٸ ŭ (: a="a", b="c" strcmp=2) µDZ ˾Ƽ ڵֽø ǰڿ. ׷ strcmp ŭ ... ϴ.
2013/03/29  
3204   ġƮ DZ[1]     rjsdudals123
02/15 214
3203   ãּ [1]     marunim
05/30 951
3202   c segmentation fault:11 帳ϴ![2]     leebk1124
05/21 2028
3201   C++Լ ̿!![3]     1999dylee
05/11 1858
3200   ̽ 帳ϴ.[1]     kksh1107
04/24 1598
3199   - -     nninni79
04/20 2301
3198   ް ڵ[1]     ghjk645
03/24 1620
3197 бԴϴ  c Ҽ      adwefq
04/29 1
3196   C ҽԴϴ![5]     an0088
01/05 5171
3195   C++ /// Ф[1]     guichanta
08/23 2406
3194 бԴϴ  c ּФ     su6339
04/06 0
3193   ŷ ϴµ[3]     zoodem04
03/26 4186
3192   c ; ![7]     dwc07238
02/11 4090
3191   ̴ ⿡ ؼ!![1]     hackxx123
12/10 3534
3190   ŷ ip ϵ忡 ɴ°ſ  ?[2]     aowlrgmlals
11/27 4314
3189   C ϴµ double Ǽ ڲ 0.0 Ϳ[2]     fatou10336
11/20 3774
3188   dumpcode.h ּ .[1]     cm6418
11/06 3745
3187   c ˰ Դϴ.[3]     alstn8150
10/12 3762
3186     [re] c ˰ Դϴ.     dafher
05/13 1597
3185   c ҽ ̤̤̤[2]     sjjh96
05/23 4301
1 [2][3][4][5][6][7][8][9][10]..[161]

Copyright 1999-2024 Zeroboard / skin by Hackerschool.org / Secure Patch by Hackerschool.org