코드업 기초 100제 1061번 부터 1070번 까지 풀이입니다.

모든 코드는 C로 작성되었습니다

# 1061

#include <stdio.h>

int main(){
    int a, b;
    scanf("%d%d", &a, &b);
    printf("%d\n", a^b);
    return 0;
}


# 1062

#include <stdio.h>

int main(){
    int a, b;
    scanf("%d%d", &a, &b);
    printf("%d\n", a^b);
    return 0;
}


# 1063

#include<stdio.h>

int main(){
    int a, b;
    scanf("%d%d",&a, &b);
    printf("%d", a > b ? a : b);
    return 0;
}


# 1064

#include <stdio.h>

int main(){
    int a, b, c;
    scanf("%d%d%c", &a, &b, &c);
    printf("%d\n", a<b ? (a<c?a:c) : (b<c?b:c) );
    return 0;
}


# 1065

#include <stdio.h>

int main(){
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);
    if(a%2 == 0) printf("%d\n", a);
    if(b%2 == 0) printf("%d\n", b);
    if(c%2 == 0) printf("%d\n", c);
    return 0;
}


# 1066

#include <stdio.h>

int main(){
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);

    if(a%2 == 0) printf("even\n");
    else printf("odd\n");

    if(b%2 == 0)printf("even\n");
    else printf("odd\n");

    if(c%2 == 0)printf("even\n");
    else printf("odd\n");

    return 0;
}


# 1067

#include <stdio.h>

int main(){
    int a;
    scanf("%d", &a);

    if(a > 0) printf("plus\n");
    else printf("minus\n");

    if(a%2 == 0) printf("even\n");
    else printf("odd\n");

    return 0;
}



# 1068

#include <stdio.h>

int main(){
    int a;
    scanf("%d", &a);

    if(a >= 90) printf("A\n");
    else if(a >= 70) printf("B\n");
    else if(a >= 40) printf("C\n");
    else printf("D\n");

    return 0;
}


# 1069

#include <stdio.h>

int main(){
    char a;
    scanf("%c",&a);

    switch(a)
    {
        case 'A': printf("best!!!"); break;
        case 'B': printf("good!!"); break;
        case 'C': printf("run!"); break;
        case 'D': printf("slowly~"); break;
        default: printf("what?");
    }

    return 0;
}


# 1070

#include <stdio.h>

int main(){
    char a;
    scanf("%d",&a);
    switch(a)
    {
        case 12:
        case 1:
        case 2:printf("winter");break;
        case 3:
        case 4:
        case 5:printf("spring");break;
        case 6:
        case 7:
        case 8:printf("summer");break;
        case 9:
        case 10:
        case 11:printf("fall");break;

    }

    return 0;
}



감사합니다! 🙂