#include <stdio.h>

//함수 선언
int add(int a, int b);
int minus();
void multiply(int a, int b);
void divide();

int main() {
    //함수 호출
    add(1,2);
    minus();
    multiply(2,3);
    divide();
}

//함수 정의
//반환값 O, 파라미터 O
int add(int a, int b){
    return a+b;
}

//반환값 O, 파라미터 X
int minus(){
    int a=1, b=2;
    return b-a;
}

//반환값 X, 파라미터 O
void multiply(int a, int b){
    printf("%d\n", a*b);
}

//반환값 X, 파라미터 X
void divide(){
    int a=10, b=2;
    printf("%d\n", a/b);
}

Embed on website

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