ÇÁ·Î±×·¡¹Ö

 3204, 19/161 ȸ¿ø°¡ÀÔ  ·Î±×ÀΠ 
   cherish_247
   c±¸Á¶Ã¼ °úÁ¦Çϴµ¥ Àß ¾ÈµÇ¼­¿ä¤Ì µµ¿ÍÁÖ¼¼¿ä¤Ì¤Ì¤Ì

http://www.hackerschool.org/HS_Boards/zboard.php?desc=asc&no=3379 [º¹»ç]


¹®Á¦°¡ : 2°³ÀÇ complexÇü ¸Å°³º¯¼öc1°ú c2ÀÇ ÇÕÀ» ±¸ÇØ ¹ÝȯÇÏ´Â ÇÔ¼ö ÀÛ¼º

¿¹¿ä¤Ì¤Ì

¿¡·¯°¡ ÇÑ°³³ª´Âµ¥....¤Ì ¸ø°íÄ¡°Ù¾î¿ä..¤Ì¤Ì¤Ì¤Ì



#include<stdio.h>
typedef struct complex{
        float real;
        float imaginary;
}complex;

complex complexAdd(complex c1, complex c2);

int main()
{
        complex c1 = {1, 2};
        complex c2 = {3, 4};
        complex c3;
    c3=complexAdd(c1, c2);
        printf("{%d, %d} \n", c3.real, c3.imaginary);


        return 0;
}

complex complexAdd(complex c1, complex c2)
{    
        complex c;
    c.real=c1.real+c2.real;
        c.imaginary=c1.imaginary+c2.imaginary;
        c={c.real, c.imaginary};

        return c;
}





µµ¿ÍÁÖ¼¼¿ä¤Ì¤Ì

  Hit : 3001     Date : 2012/04/03 03:32



    
ralehgus123 ¿¡·¯°¡ ¹¹¶ó°í ¶ß´Âµ¥¿©? 2012/04/03  
ppooooqq c={c.real, c.imaginary}; ÀÌ°Å »©¿ä 2012/04/03  
ppooooqq printf("{%f, %f} \n", c3.real, c3.imaginary);

printf("{%d, %d} \n", (int)c3.real, (int)c3.imaginary);
2012/04/03  
2844   ÀÌ°Ç µµµ¥Ã¼ ¾î¶°ÇÑ ¹æ¹ýÀ¸·Î ·ºÀ» °É¸®°ÔÇÑ ÇÁ·Î±×·¥ÀÌÁÒ[3]     ÇÁ·Î±×·¥
11/05 3295
2843   ÀÌ ´Ü¾î Á»¿ä ¤Ð¤Ð(Áߺ¹¤¸¤µ)[4]     ÇÁ¸®Åä
07/31 2677
2842   c¾ð¾î ÇÁ·Î±×·¥À»Çϳª¸¸µé¾ú´Âµ¥ ¿À·ù°¡¶°¿ä![5]     cdc3434
07/05 4061
2841   [c¾ð¾î] Æ÷ÀÎÅÍ Áú¹®ÀÔ´Ï´Ù.[3]     cdpython
08/07 3326
2840   ÁÖÇÁ·Î±×·¥°ú ºÎÇÁ·Î±×·¥[2]     cert_999
09/25 4306
2839   ÆÄÀ̽㠰ü·ÃÁú¹®ÇÕ´Ï´Ù.[1]     cgw0525
02/27 2294
2838   À©µµ¿ì ÇÁ·Î±×·¡¹Ö     ch hacker
05/28 2781
2837   ÇÔ¼ö[2]     ch hacker
05/28 2718
2836   ½ÃÀÛÇÏÀÚ¸¶ÀÚ ¹ÌÄ¡°ÔÇÏ´Â ¾¾¾ð¾î[3]     cham01
03/22 3580
2835   ¼ÒÄÏÇÁ·Î±×·¡¹Ö - recvfrom À̳ª sendto ÇÔ¼öÀÇ Æ¯Â¡[2]     chamchi
09/18 6201
2834   ÀÎÅͳÝÀ¯µ¿IPº¯È¯ÇÁ·Î±×·¥Á»±¸ÇÒ¼öÀÖÀ»±î¿ä?[3]     chan6548
04/24 3616
2833   ÆÄÀ̽ã Áú¹®ÀԴϴ٤̤̠    chdl1227
06/14 3038
2832   [C++] ÀÌ°Å ¿À·ù Á» Àâ¾Æ ÁÖ¼¼¿ä¤Ì¤Ì[1]     cherish_247
10/18 3225
2831   [MFC] Áý¸¸µé±â ÁßÀä...¤Ð¤Ð[2]     cherish_247
10/24 2903
2830   [C++] ÀÌ°Å ¿À·ù Á» Àâ¾Æ ÁÖ¼¼¿ä..¤Ì¤Ì[2]     cherish_247
11/16 3544
  c±¸Á¶Ã¼ °úÁ¦Çϴµ¥ Àß ¾ÈµÇ¼­¿ä¤Ì µµ¿ÍÁÖ¼¼¿ä¤Ì¤Ì¤Ì[3]     cherish_247
04/03 3000
2828   ¿¬°á¸®½ºÆ®¿¡¼­ »ðÀÔ, »ðÁ¦ ÇÔ¼ö... µµ¿ÍÁÖ¼¼¿ä¤Ì¤Ì Á¦¹ß..¤Ì¤Ì¤Ì[1]     cherish_247
05/16 4230
2827   MFC6.0À» ÀÌ¿ëÇÑ Åõ¸íµµ ¼³Á¤ÀÌ¿ä¤Ì ±ÞÇØ¿ä¤Ì¤Ì      cherish_247
12/24 2959
2826   ÀÚ¹Ù Áú¹®ÀÔ´Ï´Ù.¤Ì¤Ì     cherish_247
06/04 3428
2825   C¾ð¾î Äڵ忡 °ü·ÃÇؼ­ Áú¹®µå¸³´Ï´Ù. [1]     chht123
12/03 4039
[1]..[11][12][13][14][15][16][17][18] 19 [20]..[161]

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