2. 関数について
#include<stdio.h>
int sum(int a, int b);
int main(void){
int result = 0;
result = sum(2,3);
printf(“result = %dn”,result);
return 0;
}
int sum(int a,int b){
int c = 0;
c = a + b;
return c;
}
3. 関数について
#include<stdio.h>
int sum(int a, int b);
int main(void){
int result = 0;
result = sum(2,3);
printf(“result = %dn”,result);
return 0;
}
int sum(int a,int b){
int c = 0;
c = a + b;
return c;
}
main関数→sum関数