#include <stdio.h>
int difference(int a,int b){
int x=0,result,y;
if(a<b)
result=b-a;
else
result=a-b;
x=10-80;
y=x-50;
return result; // return 을 빼먹으면 어떤일이 벌어질까?
}
int main() {
int a,b,i;
printf("write two numbers: \n");
for(i=0; i<5; i++){
scanf("%d,%d",&a, &b);
printf("the difference of the two numbers: %d\n", difference(a,b));
}
//scanf("%d,%d",&a, &b);
//printf("the difference of the two numbers: %d", difference(a,b));
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: