12/16,C 언어 시험대비 복습!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
C
#include <stdio.h>
//2. 함수 선언 (MAIN 함수보다 위에)
int add(int a,int b);
void mbc(int a,int b);
int you(int a,int b);
void jun(int a,int b,int c,int d);
int main() {
//3.함수 호출
add(2,3);
mbc(8,3);
printf("곱:%d\n",you(9,3));
jun(1,2,3,4);
}
//1. 함수 정의 (main함수 밖에 정의한다.)
int add(int a,int b){
return a+b;
}
void mbc(int a,int b){
printf("차:%d\n",a-b);
}
int you(int a,int b){
return a*b;
}
void jun(int a,int b,int c,int d){
printf("합계:%d\n",a+b+c+d);
}
Output
Embed on website
To embed this program on your website, copy the following code and paste it into your website's HTML:
Comments
This comment belongs to a banned user and is only visible to admins.
This comment belongs to a deleted user and is only visible to admins.