α׷

 3204, 3/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 : 9753     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  
3164   [C] Ƽ??[4]     Ѱ
06/27 10111
3163   c++ ŷ[5]     cks
05/31 10047
  ڿ if [3]     nsh009
03/13 9752
3161   ũμ avr α׷¥ LED ε~[4]     oh88kth
04/06 9708
3160   $_GET[] ?[4]     qkreoghks00
09/23 9521
3159   C++ ڵ ̿ â ..     sweetick
11/18 9494
3158   [C] ÷ο ... 0xC00000FD : Stack overflow[7]     Ź米Ȳ
05/13 9483
3157     [re] ڷᱸ Ŀ ؼ ֽǺ...Ź帮ڽϴ    
10/25 9402
3156   [7]     raldbstn8
01/09 9324
3155   ͷ Ѿµ "" 鿡... ̻ؿ[4]     capt_0669
12/26 9311
3154   C #define [8]     windowhan
09/01 9244
3153     [re] c ýۻ ˾Ƴ.[2]     indra
12/06 9184
3152   [C++]µ ȭµ, ȭµ µ[2]     kiki5531
04/06 9155
3151   c ȯ Ű[6]     d4rkang3l
05/18 9077
3150     [re] ũμ avr α׷¥ LED ε~[1]     prosper
04/06 8954
3149     [re] c c ˷ּ.,..     y2family
09/04 8866
3148   369 (C++)[2]     qkreoduf1654
10/09 8803
3147   while getchar()[2]    
01/19 8800
3146   ̰ ȵdz Ф[2]     ysp0530
09/08 8739
3145   C ü 帳ϴ.[6]     dydwo9177
08/27 8458
[1][2] 3 [4][5][6][7][8][9][10]..[161]

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