α׷

 3206, 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 : 9724     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  
3166   [C] Ƽ??[4]     Ѱ
06/27 10095
3165   c++ ŷ[5]     cks
05/31 10019
  ڿ if [3]     nsh009
03/13 9723
3163   ũμ avr α׷¥ LED ε~[4]     oh88kth
04/06 9666
3162   $_GET[] ?[4]     qkreoghks00
09/23 9471
3161   [C] ÷ο ... 0xC00000FD : Stack overflow[7]     Ź米Ȳ
05/13 9461
3160   C++ ڵ ̿ â ..     sweetick
11/18 9451
3159     [re] ڷᱸ Ŀ ؼ ֽǺ...Ź帮ڽϴ    
10/25 9383
3158   [7]     raldbstn8
01/09 9303
3157   ͷ Ѿµ "" 鿡... ̻ؿ[4]     capt_0669
12/26 9293
3156   C #define [8]     windowhan
09/01 9205
3155     [re] c ýۻ ˾Ƴ.[2]     indra
12/06 9152
3154   [C++]µ ȭµ, ȭµ µ[2]     kiki5531
04/06 9141
3153   c ȯ Ű[6]     d4rkang3l
05/18 9062
3152     [re] ũμ avr α׷¥ LED ε~[1]     prosper
04/06 8928
3151     [re] c c ˷ּ.,..     y2family
09/04 8837
3150   369 (C++)[2]     qkreoduf1654
10/09 8787
3149   while getchar()[2]    
01/19 8776
3148   ̰ ȵdz Ф[2]     ysp0530
09/08 8716
3147   [MFC] CPoint 迭 ڿ ʱȭ ִ¹ Դϴ.     bobys83
08/13 8426
[1][2] 3 [4][5][6][7][8][9][10]..[161]

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