Ralph, don’t let anybody put limitations on what you can achieve. 
If you want to be an engineer, you can be an engineer.

- Ralph de la Vega's grandmother

랄프, 다른 사람의 말 때문에 네가 할 수 있는 것에 제한을 두지마라.
네가 엔지니어가 되고 싶다면 될 수 있는 거야.

- Ralph de la Vega 의 할머니 말씀

Don't care about what other people say.

 

be the happy Gosu.

woojja ))*

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

반응형

 

There is only two ways to live your life.
One is as though nothing is a miracle.
The other is as thought everything is.

- Albert Einstein

삶을 살아가는데는 두가지 방법만 있다.
하나는 기적은 없다고 생각을 하며 살아가는 방법이다.
다른 하나는 모두 기적이라고 생각하며 살아가는 방법이다. 

- 알버트 아인슈타인

 

 

행복한 고수되세요.

woojja ))*

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

반응형

Counting Sort

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#define MAX_VALUE 10001

int n, m;
int a[MAX_VALUE];

int main()
{
    printf("Count : ");
    scanf("%d", &n);
    printf("\r\n\r\n");
    for (int i = 0; i < n; i++) {
        printf("a[%d] : ", i);
        scanf("%d", &m); 
        a[m]++; 
    }
    printf("\r\n\r\n");
    printf("Result :");
    printf("\r\n");
    for (int i = 0; i < MAX_VALUE; i++) {
        while (a[i] != 0) {
            printf("%d ", i);
            a[i]--;
        }
    }

    printf("\r\n\r\n");
    system("pause");
}

 

 

be the happy Gosu.

woojja ))*

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

 

반응형

'ETC > C, C++' 카테고리의 다른 글

[C, C++] Selection Sort, Insertion Sort  (0) 2021.11.04
[C, C++] Queue in Array, Linked List  (0) 2021.10.20
[C, C++] Stack in Array, Lined List  (0) 2021.10.20
[C, C++] Sorted Doubly Linked List  (0) 2021.10.20

+ Recent posts