30´ë¸¦ ½ÃÀÛÇϸ鼭

ºÎÁ¦¸ñÀÌ ¾ø½À´Ï´Ù.



  • today
  • 0
  • total
  • 7883
  • ´ä±Û
  • 7
  • ½ºÅ©·¦
  • 0

ºí·Î±× ±¸µ¶Çϱâ



¿µ¾î ÇѸ¶µð °øºÎÇϱâ

Who brings home the bacon in this family ?

 

Both of us. We are a two-paycheck couple.

 

two-paycheck couple : ¸Â¹úÀÌ ºÎºÎ

 

ÀÌÁý¿¡¼­ µ·¹úÀ̸¦ ÇÏ´Â »ç¶÷Àº ´©±¸ÁÒ ?

µÑ¿ä. ¿ì¸®´Â ¸Â¹úÀÌ ºÎºÎ¿¹¿ä.

 

Please say hi to your family.

°¡Á·µé ÇÑÅ× ¾ÈºÎÀüÇØÁÖ¼¼¿ä.

 



ÁÖÁ¦ : ½Ã»ç/±³À° > À°¾Æ/±³À°

¡ãtop


qsort ¿¹ °øºÎÇϱâ

#include <stdio.h>
#include <stdlib.h>

/*
#include <stdlib.h>

       void qsort(void *base, size_t nmemb, size_t size,
              int (*compar)(const void *, const void *))
*/

int cmp(const void *Ary1, const void *Ary2);
int cmp_desc(const void *Ary1, const void *Ary2);

int main(int argc, char *argv[])
{

 int sort[5] = {2, 5, 10, 50, 8};
 int i, rank = 0, rank2 = 0;
 
 for(i=0; i<5; i++)
 {
  printf("sort[%d][%d]\n", i, sort[i]);
 }
 
 qsort(sort, 5, sizeof(int), cmp);
 
 for(i=0; i<5; i++)
 {
  printf("sort[%d][%d]\n", i, sort[i]);
 }
 
 qsort(sort, 5, sizeof(int), cmp_desc);
 
 for(i=0; i<5; i++)
 {
  printf("sort[%d][%d]\n", i, sort[i]);
 }
 
 return 1;
}

int cmp(const void *Ary1, const void *Ary2)
{
 const int *af1 = Ary1;
 const int *af2 = Ary2;
 
 if ( *af1 > *af2)
  return -1;
 else if( *af1 < *af2)
  return 1;
 else
  return 0;
}

int cmp_desc(const void *Ary1, const void *Ary2)
{
 const int *af1 = Ary1;
 const int *af2 = Ary2;
 
 if ( *af1 > *af2)
  return 1;
 else if( *af1 < *af2)
  return -1;
 else
  return 0;
}

 

sort[0][2]
sort[1][5]
sort[2][10]
sort[3][50]
sort[4][8]
sort[0][50]
sort[1][10]
sort[2][8]
sort[3][5]
sort[4][2]
sort[0][2]
sort[1][5]
sort[2][8]
sort[3][10]
sort[4][50]



ÁÖÁ¦ : ¿©°¡/»ýÈ°/IT > ÄÄÇ»ÅÍ/ÀÎÅͳÝ

¡ãtop