#include <stdio.h>
// 함수 선언
void addNum(int a, int b);
int box(int num);
int mul(int x, int y);

int main() {
    // 함수 호출
    addNum(11, 19);
    addNum(100, 10);
    
    printf("%d\n", box(10));

    int result = box(50);
    printf("%d\n", result);

    printf("-----문제----\n");
    int answer = mul(7, 3);
    printf("%d\n", answer);

    printf("%d\n", mul(7, 3));
    return 0;
}

// 함수 정의
//반환값X 매개변수O
void addNum(int a, int b) {
    printf("%d + %d = %d\n", a, b, a + b);
}

//반환값O 매개변수O
int box(int num) {
    return num + 5;
}

int mul(int x, int y) {
    return x * y;
}



Embed on website

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