본문 바로가기
Algorithm/JUNGOL

C언어, JUNGOL 9021 ~ 9030

by OdOp 관리자 2023. 11. 5.
SMALL

jungol 9021부터 jungol 9030까지 c언어로 작성된 코드입니다.

참고해 주시면 좋을 것 같습니다. 

 

jungol 9021

#include <stdio.h>

int main(void)
{
    int a;
    int b;

    a = 10;
    b = 10;
    printf("최초값 a = %d, b = %d\n\n", a, b);
    printf("a++ = %d, ++b = %d\n", a++, ++b);
    printf("실행후 a = %d, b = %d\n\n", a, b);
    printf("a-- = %d, --b = %d\n", a--, --b);
    printf("실행후 a = %d, b = %d", a, b);
    return 0;
}

 

jungol 9022

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main(void)
{
    int a;
    int b;
    int c;

    scanf("%d %d", &a, &b);
    printf("a = %d, b = %d, ", ++a, --b);
    c = a + b + 1;
    printf("c = %d", c);
    return 0;
}

 

jungol 9023

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main(void)
{
    int a;
    int b;
    int c;

    scanf("%d %d %d", &a, &b, &c);
    printf("%d %d %d %d", a == b, b == c, a != b, b != c);
    return 0;
}

 

jungol 9024

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main(void)
{
    int a;
    int b;
    int c;

    scanf("%d %d %d", &a, &b, &c);
    printf("%d %d %d %d", a > b, b >= c, a <= b, b < c);
    return 0;
}

 

jungol 9025

#include <stdio.h>

int main(void)
{
    int a;
    int b;
    int c;

     a = 0;
     b = 1;
     c = 2;
    printf("%d %d %d %d", a && b, a || b, b && c, !a);
    return 0;
}

 

jungol 9026

#include <stdio.h>

int main(void)
{
    int a;
    int b;
    int c;

    a = 0;
    b = 1;
    c = 2;
    printf("%d %d %d %d", b && c, a || b, !b, !a);
    return 0;
}

 

jungol 9027

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main(void)
{
    int a;
    int b;
    float c;
    float d;

    scanf("%f %f", &c, &d);
    a = c;
    b = d;
    printf("%.0f %d", c + d, a + b);
    return 0;
}

 

jungol 9028

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main(void)
{
    int a;

    scanf("%d", &a);
    printf("%d / 4 = %d\n", a, a / 4);
    printf("%d / 4.0 = %.2f", a, a / 4.0);
    return 0;
}

 

jungol 9029

jungol 9029는 존재하지 않습니다. 

 

jungol 9030

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main(void)
{
    int a;

    a = 0;
    scanf("%d", &a);
    printf("%d\n", a);
    if (a > 10)
    {
        printf("10보다 큰 수를 입력하셨습니다.");
    }
    return 0;
}
LIST

'Algorithm > JUNGOL' 카테고리의 다른 글

C언어, JUNGOL 121 ~ 130  (0) 2023.11.07
C언어, JUNGOL 521 ~ 530  (0) 2023.11.06
C언어, JUNGOL 111 ~ 120  (2) 2023.11.04
C언어, JUNGOL 511 ~ 520  (0) 2023.11.03
C언어, JUNGOL 9011 ~ 9020  (2) 2023.11.02