In this code main() doesn't recognize the variable results of a called function, in this case pro_afai.
#include <stdio.h>
here i create the function pro_afai
int pro_afai(int x,int y){
int pro,afai;
pro=x+y;
afai=x-y;}
main(){
Here i tried to declare pro=0 and afai=0 into main but it still doesn't work because it prints 0,0. printf doesn't take the result from the function.
int i,j;
int pro,afai;
printf("2 num:");
scanf("%d %d",&i,&j);
pro_afai(i,j);
printf("\npro=%d\nafai=%d",pro,afai);})
but printf won't print the normal result. how can i fix it??