#include <stdio.h>

int main() {
    int num[5];
    int min = 0;


    for(int i=0; i <5; i++){
        printf("%d몇번째 입력: \n", i+1);
        scanf("%d", &num[i]);
    }
    min = num[0];
    for(int i=1; i<5; i++){
        if(min>num[i+1]){
            min = num[i];
        }
    }
    printf("가장 작은 수는 %d입니다\n", min);



    char str1[5] = {'d', 'l', 'a', 'b'};
    char str2[7] = "daddys";
    char str3[] = "lab";

    printf("%s\n",str1);
    printf("%s\n",str2);
    printf("%s\n",str3);






    char str4[] = "The sky was clear and bright. I walked outside and felt the cool breeze. A dog was playing near the park. People were enjoying their morning coffee. Everything felt peaceful and quiet. It was a simple but happy day.";
    int cnt = 0;
    for(int i =0; i<sizeof(str4); i++){
        if (str4[i] == ' '){
            cnt+=1;
            
        }
    }
    printf("공백은 %d개 입니다.\n", cnt);




    int a[6];
    int tnt = 0;
    int ghf = 0;
    for (int i = 0; i < 6; i++){
        printf("정수를 입력하세요: \n");
        scanf("%d", &a[i]);

        if (a[i] % 2 == 0){
            tnt++;
        }
        else{
            ghf++;
        }
    }

    printf("홀수의 개수: %d\n", tnt);
    printf("짝수의 개수: %d\n", ghf);

    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: